@@ -99,15 +99,10 @@ impl Error {
9999 ErrorCode :: InternalError . into ( )
100100 }
101101
102- /// **UNSTABLE**
103- ///
104- /// This capability is not part of the spec yet, and may be removed or changed at any point.
105- ///
106102 /// Request was cancelled.
107103 ///
108104 /// Execution of the method was aborted either due to a cancellation request from the caller
109105 /// or because of resource constraints or shutdown.
110- #[ cfg( feature = "unstable_cancel_request" ) ]
111106 #[ must_use]
112107 pub fn request_cancelled ( ) -> Self {
113108 ErrorCode :: RequestCancelled . into ( )
@@ -183,11 +178,6 @@ pub enum ErrorCode {
183178 #[ schemars( transform = error_code_transform) ]
184179 #[ strum( to_string = "Internal error" ) ]
185180 InternalError , // -32603
186- #[ cfg( feature = "unstable_cancel_request" ) ]
187- /// **UNSTABLE**
188- ///
189- /// This capability is not part of the spec yet, and may be removed or changed at any point.
190- ///
191181 /// Execution of the method was aborted either due to a cancellation request from the caller or
192182 /// because of resource constraints or shutdown.
193183 #[ schemars( transform = error_code_transform) ]
@@ -227,7 +217,6 @@ impl From<i32> for ErrorCode {
227217 -32601 => ErrorCode :: MethodNotFound ,
228218 -32602 => ErrorCode :: InvalidParams ,
229219 -32603 => ErrorCode :: InternalError ,
230- #[ cfg( feature = "unstable_cancel_request" ) ]
231220 -32800 => ErrorCode :: RequestCancelled ,
232221 -32000 => ErrorCode :: AuthRequired ,
233222 -32002 => ErrorCode :: ResourceNotFound ,
@@ -246,7 +235,6 @@ impl From<ErrorCode> for i32 {
246235 ErrorCode :: MethodNotFound => -32601 ,
247236 ErrorCode :: InvalidParams => -32602 ,
248237 ErrorCode :: InternalError => -32603 ,
249- #[ cfg( feature = "unstable_cancel_request" ) ]
250238 ErrorCode :: RequestCancelled => -32800 ,
251239 ErrorCode :: AuthRequired => -32000 ,
252240 ErrorCode :: ResourceNotFound => -32002 ,
@@ -275,7 +263,6 @@ fn error_code_transform(schema: &mut Schema) {
275263 "MethodNotFound" => ErrorCode :: MethodNotFound ,
276264 "InvalidParams" => ErrorCode :: InvalidParams ,
277265 "InternalError" => ErrorCode :: InternalError ,
278- #[ cfg( feature = "unstable_cancel_request" ) ]
279266 "RequestCancelled" => ErrorCode :: RequestCancelled ,
280267 "AuthRequired" => ErrorCode :: AuthRequired ,
281268 "ResourceNotFound" => ErrorCode :: ResourceNotFound ,
0 commit comments