Skip to main content

Module response

Module response 

Source
Expand description

Error response envelopes.

Parse has two different error bodies, and they are not interchangeable. Getting this wrong is invisible in a browser and breaks SDKs, because clients branch on the presence of code.

SourceStatusBody
A Parse.Error400, or 404 for OBJECT_NOT_FOUND, or 500 for INTERNAL_SERVER_ERROR{"code":N,"error":"..."}
An HTTP-level rejectionas given, e.g. 403{"error":"..."} with no code

Upstream: handleParseErrors (middlewares.js:596-645). The code-less shape comes from the err.status && err.message branch at :629-631.

Structs§

HttpError
An HTTP-level rejection: a status and a message, with no Parse error code.
ParseErrorResponse
A Parse.Error, with upstream’s status mapping.