feat: add MFARequired error to ChorusError
This commit is contained in:
parent
c3eec16c29
commit
538781502c
|
@ -5,7 +5,7 @@
|
||||||
//! Contains all the errors that can be returned by the library.
|
//! Contains all the errors that can be returned by the library.
|
||||||
use custom_error::custom_error;
|
use custom_error::custom_error;
|
||||||
|
|
||||||
use crate::types::WebSocketEvent;
|
use crate::types::{MfaRequiredSchema, WebSocketEvent};
|
||||||
use chorus_macros::WebSocketEvent;
|
use chorus_macros::WebSocketEvent;
|
||||||
|
|
||||||
custom_error! {
|
custom_error! {
|
||||||
|
@ -46,7 +46,9 @@ custom_error! {
|
||||||
/// Malformed or unexpected response.
|
/// Malformed or unexpected response.
|
||||||
InvalidResponse{error: String} = "The response is malformed and cannot be processed. Error: {error}",
|
InvalidResponse{error: String} = "The response is malformed and cannot be processed. Error: {error}",
|
||||||
/// Invalid, insufficient or too many arguments provided.
|
/// Invalid, insufficient or too many arguments provided.
|
||||||
InvalidArguments{error: String} = "Invalid arguments were provided. Error: {error}"
|
InvalidArguments{error: String} = "Invalid arguments were provided. Error: {error}",
|
||||||
|
/// The request requires MFA verification
|
||||||
|
MfaRequired {error: MfaRequiredSchema} = "Mfa verification required to perform this action"
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<reqwest::Error> for ChorusError {
|
impl From<reqwest::Error> for ChorusError {
|
||||||
|
|
Loading…
Reference in New Issue