[ https://issues.apache.org/jira/browse/JAMES-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tellier Benoit closed JAMES-2314. --------------------------------- > Better handle exceptions in webAdmin > ------------------------------------ > > Key: JAMES-2314 > URL: https://issues.apache.org/jira/browse/JAMES-2314 > Project: James Server > Issue Type: Improvement > Components: webadmin > Reporter: Tellier Benoit > Priority: Major > Labels: easyfix, newbie > > The idea would be to ensure we : > - Return 400 status code for invalid JSON data > - That we use our JSON error format for: > - 500 Internal (uncatched) server errors > - 404 Not Found (calls on non routes endpoints) > Currently HTML is returned... > We need to register specific error handlers in the WebAdmin server. > - we need upon init to load the `service::internalServerError`, > `service::notFound` and a `service::exception targetting > JsonExtractException` in WebAdminServer :: configure. > - We should rely on the common `ErrorResponder` to have consistant error > messages > - In these routes we should avoid throwing an exception. We should have an > ErrorResponder::toResponse(Response response) method setting the body and the > response code to be used. > If you need more details to implement this feature, we are willing to provide > support. Don't hesitate to ask on https://gitter.im/apache/james-project. We > are willing to provide guidance. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org