Details
-
Fix
-
Status: Dismissed (View Workflow)
-
Minor
-
Resolution: Works as designed
-
None
Description
Current Situation
- If an API call is wrongly parameterized then an HTTP status code such as 419 is reported. Example:
/orders/add failed returnCode=419 INSUFFICIENT_SPACE_ON_RESOURCE errorMessage=com.sos.joc.model.common.Errs@564ab64f[deliveryDate=,errors=[com.sos.joc.mod el.common.Err419@25bba0e6[code=JOC-400,message=Invalid start position '[3, try, 0, try, 0]'
- While the HTTP status code is correct, the return code is not: INSUFFICIENT_SPACE_ON_RESOURCE is not the reason for the error. In this case wrong specificatio of the start position when adding an order is the root cause.
Desired Behavior
- Provide correct return code when API calls are wrongly parameterized.
Maintainer Note
- The meaning of http status code 419 is specific for the JOC Cockpit application ("object not found"). The related RFC2616 allows status codes beyond 417 for purposes of an application.
- The misleading phrase in the HTTP response is provided from the Jetty Servlet Container. Jetty does not allow to specify custom phrases. Instead, the Jetty makes use of the hard-coded phrase INSUFFICIENT_SPACE_ON_RESOURCE for http status code 419.
- There cannot be a solution to the problem as the Servlet Container populates any http status codes with own phrases that have tendency not to match application purposes.
- Newer versions of the HTTP protocol discourage use of phrases and drop the information. With upcoming Jetty releases phrases will accordingly be dropped.