gameservices-common/src/main/java/com/firmys/gameservice/common/error/GameDataExceptionController.java
/**
     * Fail-over exception handler for controllers
     * @param exception general exception
     * @return response which includes GameServiceException
     */
Fail-over exception handler for controllers
@param exception general exception
@return response which includes GameServiceException
Fail - over exception handler for controllers @param exception general exception @return response which includes GameServiceException
@ExceptionHandler(Exception.class)
    public ResponseEntity<? extends GameEntity> generalException(Exception exception) {
        exception.printStackTrace();
        return new ResponseEntity<>(GameServiceException.builder.withGameServiceError(
                GameServiceError.builder.withName(exception.getClass().getSimpleName())
                        .withDescription(exception.getMessage()).build()).build()
                .getGameServiceError(), HttpStatus.MULTI_STATUS);
    }
@ ExceptionHandler ( Exception . class ) public ResponseEntity < ? extends GameEntity > generalException ( Exception exception ) { exception . printStackTrace ( ) ; return new ResponseEntity < > ( GameServiceException . builder . withGameServiceError ( GameServiceError . builder . withName ( exception . getClass ( ) . getSimpleName ( ) ) . withDescription ( exception . getMessage ( ) ) . build ( ) ) . build ( ) . getGameServiceError ( ) , HttpStatus . MULTI_STATUS ) ; }
Fail-over exception handler for controllers
 @param exception general exception
 @return response which includes GameServiceException
Fail - over exception handler for controllers @param exception general exception @return response which includes GameServiceException