File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,9 @@ impl From<crate::openapi::models::model_401_error::Model401Error> for Error {
127
127
impl From < crate :: openapi:: models:: model_400_error:: Model400Error > for Error {
128
128
fn from ( e : crate :: openapi:: models:: model_400_error:: Model400Error ) -> Self {
129
129
match e. code {
130
- crate :: openapi:: models:: model_400_error:: Code :: InvalidRequest => Error :: InvalidRequest ,
130
+ crate :: openapi:: models:: model_400_error:: Code :: InvalidRequest => {
131
+ Error :: InvalidRequest ( e. error )
132
+ }
131
133
_ => Error :: Other ( e. error ) ,
132
134
}
133
135
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ pub enum Error {
22
22
Reqwest ( reqwest:: Error ) ,
23
23
Serde ( serde_json:: Error ) ,
24
24
Io ( std:: io:: Error ) ,
25
- InvalidRequest ,
25
+ InvalidRequest ( String ) ,
26
26
InvalidAccessToken ,
27
27
InvalidNonce ,
28
28
OperationNotAllowed ,
@@ -40,7 +40,7 @@ impl fmt::Display for Error {
40
40
Error :: Reqwest ( e) => ( "reqwest" , e. to_string ( ) ) ,
41
41
Error :: Serde ( e) => ( "serde" , e. to_string ( ) ) ,
42
42
Error :: Io ( e) => ( "IO" , e. to_string ( ) ) ,
43
- Error :: InvalidRequest => ( "response" , "invalid request" . to_string ( ) ) ,
43
+ Error :: InvalidRequest ( error ) => ( "response" , format ! ( "invalid request: {}" , error ) ) ,
44
44
Error :: InvalidAccessToken => ( "response" , "invalid access token" . to_string ( ) ) ,
45
45
Error :: InvalidNonce => ( "response" , "invalid nonce" . to_string ( ) ) ,
46
46
Error :: OperationNotAllowed => ( "response" , "operation not allowed" . to_string ( ) ) ,
You can’t perform that action at this time.
0 commit comments