Hi Jon,
On Apr 14, 2008, at 10:35 AM, Jonathan Cook - Online wrote:
> Hi,
>
> I was playing around with @QueryParam and thought that I might see
> some
> sort of exception if I passed in a String to hoursBefore or hoursAfter
> maybe a NumberFormatException. But all that happens is I get a blank
> page in my browser and no sign of an exception.
>
A 400 (Bad Request) will be returned.
Jersey only logs the error and creates an entity with the stack trace
if the status code is >= 500. I think we should be logging all stuff
>= 400, and think about how to have default entities configured for
such status codes.
Paul.
> This isn't a problem, I just wondered how Jersey handled this kind of
> stuff?
>
> This is the method signiture.
>
> @GET
> @ProduceMime("application/xml")
> public String getMatches(@QueryParam("competitionId") String
> competitionId,
> @QueryParam("hoursBefore") Integer hoursBefore,
> @QueryParam("hoursAfter") Integer hoursAfter)
> throws Exception {
>
> Thanks
> Jon
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain
> personal views which are not the views of the BBC unless
> specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in
> reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>