182. Update profile image back end call (#26)

This commit is contained in:
Art
2021-09-22 14:26:50 +03:00
parent 77e40c594f
commit aeeb66b833
3 changed files with 25 additions and 6 deletions

View File

@ -18,6 +18,7 @@ import org.springframework.validation.BindException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import javax.persistence.NoResultException;
import java.io.IOException;
@ -65,7 +66,8 @@ public class ExceptionHandling {
@ExceptionHandler({
EmailExistsException.class, UsernameExistsException.class,
EmailNotFoundException.class, UserNotFoundException.class
EmailNotFoundException.class, UserNotFoundException.class,
MaxUploadSizeExceededException.class
})
public ResponseEntity<HttpResponse> badRequestExceptionHandler(Exception exception) {
return createHttpResponse(BAD_REQUEST, exception.getMessage());