Rest RensponseEntity Exception

Hello,

How do we handle exceptions during API calls.

e.g. currently APIs always return 200 as long as the API call is valid.
We would like to return BAD REQUEST if there was any issues with parameters or throw custom exception with error message to frontend

I can use ReposneEntity with no issues if it was used custom controller in Portal module but when its used in Core module I get Serialization Error

Hi,
Handling the exception is possible, you need to create a Spring MVC exception handler.

Examples were presented on the forum earlier: