mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
feat: define interface for username registration"
This commit is contained in:
@@ -197,7 +197,12 @@ impl From<CredsError> for ServiceError {
|
||||
impl From<DBError> for ServiceError {
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
fn from(e: DBError) -> ServiceError {
|
||||
ServiceError::DBError(DBErrorWrapper(e))
|
||||
match e{
|
||||
DBError::UsernameTaken => ServiceError::UsernameTaken,
|
||||
DBError::SecretTaken => ServiceError::InternalServerError,
|
||||
DBError::EmailTaken => ServiceError::EmailTaken,
|
||||
_ => ServiceError::DBError(DBErrorWrapper(e))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user