Hi Arjohn,

The StatusService has two complementary purposes:

   - setting an HTTP status based on a Jave exception
   - setting a response entity in case of on error status

For the second purpose, the Component level StatusService is capable of
overwriting the response entity in case of error if:

   - no error entity has been set
   - the "overwriting" property is set to 'true'

In order to get consistent error handling across across multiple
applications, you can also try to disable the Application level
StatusServices, even though in this case the Java exception to Status
conversion will still occurs, not the response entity addition.

Hope this clarifies.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel




2013/4/2 Arjohn Kampman <arjohn.kamp...@vound-software.com>

> Hi all,
>
> According the the javadoc for StatusService, one should be able to set
> it on either the Application or the Component. However, in our case,
> only the former works. A quick peek at the restlet code shows that
> Resource.getStatusService() only calls Application.getStatusService().
> Is this an error in the javadoc, or is something wrong with our code?
> We're using restlet 2.1.1.
>
> Regards,
> Arjohn Kampman
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3052374
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3052388

Reply via email to