Hi Dave,
We will work on improving this area for 0.8. The JAX-RS specification is
proposing a much improve way to configure returning of responses for
exceptions thrown by the application or the runtime.
As part of implementing that i will endeavor to ensure that an
acceptable media type is chosen as the media type of the response
associated with an exception.
Paul.
Dave Tkaczyk wrote:
> I agree with Travis’ request. I have the same issue and have had to
> roll my own. I mildly question the need for a stack trace as traces
> aren’t usually useful to a remote consumer of a service who knows
> nothing about the server side classes. But if there’s a use case for
> it I don’t think that it’s necessarily a bad thing.
>
>
>
> =======================================================
>
>
>
> Date: Fri, 21 Mar 2008 18:05:25 -0700
>
> From: Travis Reeder <treeder_at_gmail.com>
>
> Content-Type: multipart/alternative;
>
> boundary="----=_Part_2921_10013551.1206147925231"
>
> Subject: Exception Handling
>
>
>
> This is a feature suggestion, but it would be nice if Jersey would
> return
>
> exceptions in the format specified by ProduceMime, right now it
> appears to
>
> return an html response if you have @ProduceMime("application/xml"),
> but it
>
> would be nice to have a standard exception xml format like:
>
>
>
> <exception>
>
> <message>...</message>
>
> <stackTrack>...</stackTrace>
>
> ....
>
> </exception>
>
>
>
> Travis
>
>
>
>
>
>
>
>
> Confidentiality Notice: This email message is covered by the
> Electronic Communications Privacy Act, 18 U.S.C. §2510-2521 and is
> legally privileged. Unauthorized review, use, disclosure or
> distribution is strictly prohibited. If you are not the intended
> recipient, please contact /Dave.Tkaczyk_at_innerwireless.com/ and
> destroy all copies of the original message. Thank you.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109