Skip to content

Commit

Permalink
Changed the HttpStatus code from IM_USED (226) which is a success mes…
Browse files Browse the repository at this point in the history
…sage to CONFLICT which is an error status code (409)! This is send when an email is in use. (#33)
  • Loading branch information
mjza authored Jul 31, 2020
1 parent 381fa62 commit 32ed0fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public ApiResponse handleAppException(AppException ex, WebRequest request) {
}

@ExceptionHandler(value = ResourceAlreadyInUseException.class)
@ResponseStatus(HttpStatus.IM_USED)
@ResponseStatus(HttpStatus.CONFLICT)
@ResponseBody
public ApiResponse handleResourceAlreadyInUseException(ResourceAlreadyInUseException ex, WebRequest request) {
return new ApiResponse(false, ex.getMessage(), ex.getClass().getName(), resolvePathFromWebRequest(request));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(HttpStatus.IM_USED)
@ResponseStatus(HttpStatus.CONFLICT)
public class ResourceAlreadyInUseException extends RuntimeException {

private final String resourceName;
Expand Down

0 comments on commit 32ed0fb

Please sign in to comment.