I’m getting unexpected, or undocumented behaviour from the DSP proxying an external API. The positive case works as expected, the external api’s http code 200 is passed through along with the response json payload.
However, when the external service generates an http 400 error response, the DSP curiously returns http code 200 OK along with the payload (if json) or null if a non-marked up message is provided. Is this a bug, or is there a documented approach to error pass-through from the proxied external service?
We’re using DreamFactory 1.8.2.
External REST service (zato ESB) correct response to an invalid parameter—
HTTP/1.1 400 Bad Request
Server: Zato
...
Content-Type: application/json
{"error": [{"message": "Not a valid MSISDN", "code": 400}]}
Proxied response from DSP (note changed http code) —
HTTP/1.1 200 OK
Date: Fri, 02 Jan 2015 18:52:06 GMT
Server: Apache/2.4.6
...
Content-Type: application/json; charset=utf-8
{"error":[{"message":"Not a valid MSISDN","code":400}]}