inspectit-ocelot
inspectit-ocelot copied to clipboard
Exceptions that occur in the configuration server should be handled properly
Exceptions occuring in the configuration server (e.g. when using the directory REST API) should be handled.
See the following article: https://www.toptal.com/java/spring-boot-rest-api-error-handling
Currently, we have two different situations:
- When requesting a non-existing endpoint it results in the default spring boot 404-response which looks like the following:
{
"timestamp": "2019-06-25T11:44:55.810+0000",
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/api/v1/directoriess/d"
}
- When requesting e.g. the
/directories/API and trying to fetch a path/directory which does not exist, the response will be a 404 response as well, but with an empty response body.
In addition, as far as I can see, we get no logging at all on the configuration server's APIs. E.g. the server returns a 409 CONFLICT but no additional information (empty body). At the same time, the causing exception is catched but not handled/logged, thus, we get no information on the error or that it happened.
From the point of view of an administrator, it would be helpful when those exceptions (also caused by wrong requests by the UI), are existing in the configuration server's log files.