chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <>
Subject [jira] [Commented] (CMIS-816) Allow custom error handling in the AtomPub and Browser bindings
Date Tue, 24 Jun 2014 11:33:24 GMT


Florian Müller commented on CMIS-816:

There is one-time effort of wrapping all CMIS operations. Have a look at the ConformanceCmisServiceWrapper.
It already does that and catches and handles all non-CMIS exceptions. Since programming errors
are binding agnostic, this is the logical extension point to handle them.
It's not necessary to replicate the HTTP status code mapping. Just let the service wrapper
throw the appropriate CMIS exception, which could be a different one or the same exception
with a different error message. The framework still does the transformation into HTTP status
If you want a completely different status code (which is not recommend for interoperability),
don't throw a new exception, get the HTTP servlet response from the call context and return
whatever you want.
Regarding the CSS: It only exists in the AtomPub binding implementation and an end-user should
never see this. There is also some OpenCMIS specific convention in the returned HTML message.
It's easy to break that if you return something custom. So, better not touch it.

> Allow custom error handling in the AtomPub and Browser bindings
> ---------------------------------------------------------------
>                 Key: CMIS-816
>                 URL:
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 0.11.0
>            Reporter: Carlo Sciolla
>            Priority: Critical
>         Attachments: protected-error-handling.patch
> The AtomPub and Browser bindings servlets implement exception handling through private
methods which are thus not extensible by end users. 
> This effectively inhibit fine grained control over error reporting, logging or contents
of the error messages.

This message was sent by Atlassian JIRA

View raw message