We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e686fa7 commit 2dcf229Copy full SHA for 2dcf229
src/responses/src/error.rs
@@ -155,6 +155,11 @@ quick_error! {
155
description("action request failed validation")
156
display("action request failed validation: '{}'", reason)
157
}
158
+ /** The request body can't be parsed. */
159
+ Parsing { reason: String } {
160
+ description("parsing failed")
161
+ display("parsing failed: '{}'", reason)
162
+ }
163
#[doc(hidden)]
164
__NonExhaustive {}
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
252
0 commit comments