adding FetchbillByBillId
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
package com.billpaymentservice.bbps.exception;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import com.billpaymentservice.bbps.dto.GeneralResp;
|
||||
|
||||
@RestControllerAdvice
|
||||
@ControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
|
||||
|
||||
@ExceptionHandler(CustomException.class)
|
||||
public ResponseEntity<GeneralResp> handleCustomException(CustomException ex) {
|
||||
return new ResponseEntity<>(ex.getGeneralResp(), HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user