Thrown by mobilelocker.http.* methods when the server returns a non-2xx HTTP status.
mobilelocker.http.*
Distinct from MobileLockerHTTPError — this means the request completed but the server rejected it. Inspect status and data to handle the response.
status
data
try { await mobilelocker.http.post(url, payload)} catch (err) { if (err instanceof MobileLockerHttpResponseError && err.status === 422) { showValidationError(err.data) }} Copy
try { await mobilelocker.http.post(url, payload)} catch (err) { if (err instanceof MobileLockerHttpResponseError && err.status === 422) { showValidationError(err.data) }}
Readonly
Parsed response body.
Response headers as a flat key/value map.
Optional
HTTP status code (e.g. 404, 422, 500).
404
422
500
HTTP status text (e.g. 'Not Found').
'Not Found'
Thrown by
mobilelocker.http.*methods when the server returns a non-2xx HTTP status.Distinct from MobileLockerHTTPError — this means the request completed but the server rejected it. Inspect
statusanddatato handle the response.Example