From 538781502c413c4dfd65c7cd363d8349ea4577b9 Mon Sep 17 00:00:00 2001 From: xystrive Date: Thu, 4 Jul 2024 18:03:04 +0100 Subject: [PATCH] feat: add MFARequired error to ChorusError --- src/errors.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 0d130dd..c922669 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -5,7 +5,7 @@ //! Contains all the errors that can be returned by the library. use custom_error::custom_error; -use crate::types::WebSocketEvent; +use crate::types::{MfaRequiredSchema, WebSocketEvent}; use chorus_macros::WebSocketEvent; custom_error! { @@ -46,7 +46,9 @@ custom_error! { /// Malformed or unexpected response. InvalidResponse{error: String} = "The response is malformed and cannot be processed. Error: {error}", /// 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 for ChorusError {