errorFromResponse
errorFromResponse(
httpStatus,envelope,bodyText?):WhatsAppApiError
Defined in: src/errors.ts:233
Builds a WhatsAppApiError (or WhatsAppAuthenticationError) from a
non-2xx response. The envelope is used when parseable; otherwise bodyText and
the status drive a generic API error.
Parameters
Section titled “Parameters”httpStatus
Section titled “httpStatus”number
envelope
Section titled “envelope”GraphErrorEnvelope | undefined
bodyText?
Section titled “bodyText?”string
Returns
Section titled “Returns”Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.