Skip to content

Commit

Permalink
Merge pull request #33 from DDD-Community/fix/30-issue_refresh_token
Browse files Browse the repository at this point in the history
Fix/30 issue refresh token
  • Loading branch information
minaamim authored Dec 14, 2023
2 parents ea922ce + 55fb861 commit 2712265
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'mysql:mysql-connector-java:8.0.33'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.24.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.springframework.web.bind.MissingRequestHeaderException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.servlet.NoHandlerFoundException;
Expand Down Expand Up @@ -182,9 +183,10 @@ protected ResponseEntity<ErrorResponse> handleJsonProcessingException(JsonProces
* @return ResponseEntity<ErrorResponse>
*/
@ExceptionHandler(Exception.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
protected final ResponseEntity<ErrorResponse> handleAllExceptions(Exception ex) {
log.error("Exception", ex);
final ErrorResponse response = ErrorResponse.of(ErrorCode.INTERNAL_SERVER_ERROR, ex.getMessage());
return new ResponseEntity<>(response, HTTP_STATUS_OK);
return new ResponseEntity<>(response, HttpStatus.INTERNAL_SERVER_ERROR);
}
}

0 comments on commit 2712265

Please sign in to comment.