fix: rename AccountNotFound to WebsiteNotFound

This commit is contained in:
Aravinth Manivannan 2022-04-26 19:56:31 +05:30
parent aa9cffd4cb
commit 4b43c4ed3d
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 4 additions and 4 deletions

View File

@ -79,9 +79,9 @@ pub enum ServiceError {
/// URL too long, maximum length can't be greater then 2048 characters /// URL too long, maximum length can't be greater then 2048 characters
URLTooLong, URLTooLong,
#[display(fmt = "Account not found")] #[display(fmt = "Website not found")]
/// account not found /// website not found
AccountNotFound, WebsiteNotFound,
/// when the a path configured for a page is already taken /// when the a path configured for a page is already taken
#[display( #[display(
@ -158,7 +158,7 @@ impl ResponseError for ServiceError {
ServiceError::ConfigError(_) => StatusCode::INTERNAL_SERVER_ERROR, // INTERNAL SERVER ERROR ServiceError::ConfigError(_) => StatusCode::INTERNAL_SERVER_ERROR, // INTERNAL SERVER ERROR
ServiceError::NotAUrl => StatusCode::BAD_REQUEST, //BADREQUEST, ServiceError::NotAUrl => StatusCode::BAD_REQUEST, //BADREQUEST,
ServiceError::URLTooLong => StatusCode::BAD_REQUEST, //BADREQUEST, ServiceError::URLTooLong => StatusCode::BAD_REQUEST, //BADREQUEST,
ServiceError::AccountNotFound => StatusCode::NOT_FOUND, //NOT FOUND, ServiceError::WebsiteNotFound => StatusCode::NOT_FOUND, //NOT FOUND,
ServiceError::PathTaken(_, _) => StatusCode::BAD_REQUEST, //BADREQUEST, ServiceError::PathTaken(_, _) => StatusCode::BAD_REQUEST, //BADREQUEST,
ServiceError::DuplicateRepositoryURL(_, _) => StatusCode::BAD_REQUEST, //BADREQUEST, ServiceError::DuplicateRepositoryURL(_, _) => StatusCode::BAD_REQUEST, //BADREQUEST,