Mobile Locker JavaScript SDK
    Preparing search index...

    Class MobileLockerHttpResponseError

    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 status and data to handle the response.

    try {
    await mobilelocker.http.post(url, payload)
    } catch (err) {
    if (err instanceof MobileLockerHttpResponseError && err.status === 422) {
    showValidationError(err.data)
    }
    }

    Hierarchy

    • Error
      • MobileLockerHttpResponseError
    Index

    Constructors

    Properties

    data: unknown

    Parsed response body.

    headers: Record<string, string>

    Response headers as a flat key/value map.

    message: string
    name: string
    stack?: string
    status: number

    HTTP status code (e.g. 404, 422, 500).

    statusText: string

    HTTP status text (e.g. 'Not Found').