james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaël Ouazana (JIRA) <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-2314) Better handle exceptions in webAdmin
Date Tue, 11 Jun 2019 13:25:00 GMT

    [ https://issues.apache.org/jira/browse/JAMES-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16861035#comment-16861035
] 

Raphaël Ouazana commented on JAMES-2314:
----------------------------------------

see also https://github.com/linagora/james-project/pull/2423

> 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-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message