jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-147

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 2.0
    • Component/s: providers
    • Labels:
      None

      Description

      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.

        Issue Links

          Activity

          Hide
          Santiago Pericas-Geertsen added a comment -

          See Section 4.2.4.

          Show
          Santiago Pericas-Geertsen added a comment - See Section 4.2.4.
          Hide
          Marek Potociar added a comment -

          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.

          Show
          Marek Potociar added a comment - 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.
          Hide
          beryozkin_sergey added a comment -

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

          Show
          beryozkin_sergey added a comment - sure, makes sense to limit returning 400 only to the providers running in the server scope
          Hide
          Santiago Pericas-Geertsen added a comment -

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

          Show
          Santiago Pericas-Geertsen added a comment - Please see new text that covers client and server runtime handling of exceptions.

            People

            • Assignee:
              Santiago Pericas-Geertsen
              Reporter:
              beryozkin_sergey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: