mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
toekn not found and OAS: domains
This commit is contained in:
@@ -198,10 +198,14 @@ impl From<sqlx::Error> for ServiceError {
|
||||
fn from(e: sqlx::Error) -> Self {
|
||||
use sqlx::error::Error;
|
||||
use std::borrow::Cow;
|
||||
|
||||
println!("{:?}", &e);
|
||||
if let Error::Database(err) = e {
|
||||
if err.code() == Some(Cow::from("23505")) {
|
||||
return ServiceError::UsernameTaken;
|
||||
}
|
||||
|
||||
println!("{:?}", &err.code());
|
||||
}
|
||||
|
||||
ServiceError::InternalServerError
|
||||
|
||||
Reference in New Issue
Block a user