fix: compatibility error

This commit is contained in:
Zack Fu Zi Xiang 2024-08-27 11:36:51 +08:00
parent 0c9b5882ab
commit 96e1463b39
No known key found for this signature in database
1 changed files with 4 additions and 3 deletions

View File

@ -85,15 +85,16 @@ impl Display for GoTrueErrorSerde {
/// Used to deserialize the response from the gotrue server /// Used to deserialize the response from the gotrue server
#[derive(Serialize, Deserialize, Debug, Error)] #[derive(Serialize, Deserialize, Debug, Error)]
pub struct GotrueClientError { pub struct GotrueClientError {
pub error: String, pub error: Option<String>,
pub error_description: Option<String>, pub error_description: Option<String>,
pub msg: Option<String>,
} }
impl Display for GotrueClientError { impl Display for GotrueClientError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!( f.write_fmt(format_args!(
"error: {}, description: {:?}", "error: {:?}, error_description: {:?}, msg: {:?}",
self.error, self.error_description self.error, self.error_description, self.msg
)) ))
} }
} }