Issue Details (XML | Word | Printable)

Key: JAX_RS_SPEC-147
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Santiago Pericas-Geertsen
Reporter: beryozkin_sergey
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Add recommendation for default MBRs to return 400 in case of failing to read the message payload

Created: 12/Dec/11 04:26 PM   Updated: 26/Mar/13 01:29 PM   Resolved: 26/Mar/13 01:29 PM
Component/s: providers
Affects Version/s: 1.1
Fix Version/s: 2.0

Time Tracking:
Not Specified

Issue Links:

Participants: beryozkin_sergey, Marek Potociar and Santiago Pericas-Geertsen

 Description  « Hide

Default MessageBodyReaders should return 400 in case of dealing with unreadable (malformed, etc) payloads.
Sometimes it may not be obvious whether a read has failed due to a bad payload or not, so I propose to limit this recommendation to something like this: default MessageBodyReaders SHOULD return 400 when failing to read the payload.

Santiago Pericas-Geertsen added a comment - 26/Jun/12 03:21 PM

See Section 4.2.4.

Marek Potociar added a comment - 22/Mar/13 02:18 PM

Since the entity providers are common for both client and server, mandating that providers throw a 400 error is IMO wrong as it neglects to consider client side scenarios.

beryozkin_sergey added a comment - 22/Mar/13 02:27 PM

sure, makes sense to limit returning 400 only to the providers running in the server scope

Santiago Pericas-Geertsen added a comment - 26/Mar/13 01:29 PM

Please see new text that covers client and server runtime handling of exceptions.