File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,11 @@ quick_error! {
155
155
description( "action request failed validation" )
156
156
display( "action request failed validation: '{}'" , reason)
157
157
}
158
+ /** The request body can't be parsed. */
159
+ Parsing { reason: String } {
160
+ description( "parsing failed" )
161
+ display( "parsing failed: '{}'" , reason)
162
+ }
158
163
#[ doc( hidden) ]
159
164
__NonExhaustive { }
160
165
}
@@ -235,6 +240,13 @@ impl From<Map<String, Value>> for ParsedApiError {
235
240
reason : reason. into ( ) ,
236
241
} )
237
242
}
243
+ "parsing_exception" => {
244
+ let reason = error_key ! ( obj[ reason] : |v| v. as_str( ) ) ;
245
+
246
+ ParsedApiError :: Known ( ApiError :: Parsing {
247
+ reason : reason. into ( ) ,
248
+ } )
249
+ }
238
250
_ => ParsedApiError :: Unknown ( obj) ,
239
251
}
240
252
}
You can’t perform that action at this time.
0 commit comments