Skip to content

Commit

Permalink
feat: update not found custom errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tdayko committed Apr 20, 2024
1 parent 9654b62 commit b824e7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HigiaServer.Application.Errors;

public class CollaboratorIdNotFound(string collaboratorId) : Exception, IServiceException
{
public HttpStatusCode StatusCode => HttpStatusCode.NotFound;
public HttpStatusCode StatusCode => HttpStatusCode.BadRequest;

public string ErrorMessage =>
$"The Collaborator with id {collaboratorId} was not found in the system. Please provide a valid Id.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HigiaServer.Application.Errors;

public class EmailGivenNotFoundException(string email) : Exception, IServiceException
{
public HttpStatusCode StatusCode => HttpStatusCode.NotFound;
public HttpStatusCode StatusCode => HttpStatusCode.NoContent;
public string ErrorMessage =>
$"The email {email} was not found in the system. Please provide a valid email.";
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace HigiaServer.Application.Errors;

public class TaskIdGivenNotFoundException(string taskId) : Exception, IServiceException
{
public HttpStatusCode StatusCode => HttpStatusCode.NotFound;
public HttpStatusCode StatusCode => HttpStatusCode.NoContent;

public string ErrorMessage =>
$"The task id {taskId} given was not found in the system. Please provide a valid task id.";
Expand Down

0 comments on commit b824e7b

Please sign in to comment.