evrentan/qr-code-generator-backend

Implement a Custom Exception Management

evrentan opened this issue ยท 6 comments

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
Implement a Custom Exception Management class in order to use it while handling exceptions throughout the code base.

Describe alternatives you've considered
N/A

Additional context
N/A

Hello @evrentan ๐Ÿ‘‹, please, could you explain me a little more what you want to do? you could try it

Hi @nmarulo ๐Ÿ‘‹๐Ÿป,
The ultimate goal is to implement a global custom exception handler class in order to manage exceptions in a centralized way. Like the WriterException, IOException exceptions that are catched in impl class.

You can check one of my prev example from the below repo;

https://github.com/evrentan/spring-boot-project-example/blob/main/src/main/java/evrentan/examples/springbootprojectexample/exception/GlobalRestExceptionHandler.java

@evrentan
Ok, using @RestControllerAdvice I understand.
The object with the custom error, the same?

Yes, it can be same. The later task will implement ResourceBundles and chaning the messages according to preferred language in the message (i.e., for example an attribute in the header).

Do you want to take this issue?

Do you want to take this issue?

ok, I will do it ๐Ÿ‘

Just assigned to you. Thanks :)