Refactored db directory
This commit is contained in:
@@ -112,6 +112,24 @@ impl From<redis::RedisError> for ServiceError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<s3::error::S3Error> for ServiceError {
|
||||
fn from(error: s3::error::S3Error) -> ServiceError {
|
||||
ServiceError::new(500, format!("Unknown s3 error: {}", error))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<s3::creds::error::CredentialsError> for ServiceError {
|
||||
fn from(error: s3::creds::error::CredentialsError) -> ServiceError {
|
||||
ServiceError::new(500, format!("Unknown credentials error: {}", error))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<minio::s3::error::Error> for ServiceError {
|
||||
fn from(error: minio::s3::error::Error) -> ServiceError {
|
||||
ServiceError::new(500, format!("Unknown minio error: {}", error))
|
||||
}
|
||||
}
|
||||
|
||||
impl ResponseError for ServiceError {
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
let status_code = match StatusCode::from_u16(self.status) {
|
||||
|
||||
Reference in New Issue
Block a user