Add M_WEAK_PASSWORD error code to ruma-client-api
This commit is contained in:
parent
08d60b3d37
commit
e4a21580a2
@ -136,6 +136,9 @@ pub enum ErrorKind {
|
||||
/// M_CANNOT_LEAVE_SERVER_NOTICE_ROOM
|
||||
CannotLeaveServerNoticeRoom,
|
||||
|
||||
/// M_WEAK_PASSWORD
|
||||
WeakPassword,
|
||||
|
||||
#[doc(hidden)]
|
||||
_Custom { errcode: PrivOwnedStr, extra: Extra },
|
||||
}
|
||||
@ -179,6 +182,7 @@ impl AsRef<str> for ErrorKind {
|
||||
Self::Exclusive => "M_EXCLUSIVE",
|
||||
Self::ResourceLimitExceeded { .. } => "M_RESOURCE_LIMIT_EXCEEDED",
|
||||
Self::CannotLeaveServerNoticeRoom => "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM",
|
||||
Self::WeakPassword => "M_WEAK_PASSWORD",
|
||||
Self::_Custom { errcode, .. } => &errcode.0,
|
||||
}
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ impl<'de> Visitor<'de> for ErrorKindVisitor {
|
||||
.map_err(de::Error::custom)?,
|
||||
},
|
||||
ErrCode::CannotLeaveServerNoticeRoom => ErrorKind::CannotLeaveServerNoticeRoom,
|
||||
ErrCode::WeakPassword => ErrorKind::WeakPassword,
|
||||
ErrCode::_Custom(errcode) => ErrorKind::_Custom { errcode, extra },
|
||||
})
|
||||
}
|
||||
@ -246,6 +247,7 @@ enum ErrCode {
|
||||
Exclusive,
|
||||
ResourceLimitExceeded,
|
||||
CannotLeaveServerNoticeRoom,
|
||||
WeakPassword,
|
||||
_Custom(PrivOwnedStr),
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user