FormsApiError
A non-2xx response from the Forms API. status and body are exposed so callers can branch on
the specific failure rather than parsing a message: 401 (bad or revoked key), 402 (the
organization’s subscription needs attention), 404 (no such form for this organization), 409 (the
form has two fields sharing a submission key and must be fixed in the Forms editor), 429 (rate
limited — a Retry-After header accompanies it).
requestId is the request’s reference: the X-Request-Id response header, else the body’s
requestId (an unhandled 500 carries it there too), else null — as it is for a response a
proxy generated, which never reached the API. Quote it to support; it is how that request is found
in the logs.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FormsApiError(
status,body,requestId?):FormsApiError
Parameters
Section titled “Parameters”status
Section titled “status”number
unknown
requestId?
Section titled “requestId?”string | null
Returns
Section titled “Returns”FormsApiError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”
readonlybody:unknown
cause?
Section titled “cause?”
optionalcause?:unknown
Inherited from
Section titled “Inherited from”Error.cause
message
Section titled “message”message:
string
Inherited from
Section titled “Inherited from”Error.message
name:
string
Inherited from
Section titled “Inherited from”Error.name
requestId
Section titled “requestId”
readonlyrequestId:string|null
stack?
Section titled “stack?”
optionalstack?:string
Inherited from
Section titled “Inherited from”Error.stack
status
Section titled “status”
readonlystatus:number