Class GlobalExceptionHandler
java.lang.Object
org.qubership.atp.auth.springbootstarter.handlers.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ErrorResponse> commonHandler(Exception exception, jakarta.servlet.http.HttpServletRequest request) Global handler for exceptions.
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
commonHandler
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<ErrorResponse> commonHandler(Exception exception, jakarta.servlet.http.HttpServletRequest request) throws Exception Global handler for exceptions.- Parameters:
exception- - Exception objectrequest- - HttpServletRequest- Returns:
- ErrorResponse entity.
- Throws:
Exception
-