Class

BadResponseError

BadResponseError(message, response)

BadResponseError is raised when a response from a Horizon or Federation server is invalid in some way. For example, a federation response may exceed the maximum allowed size, or a transaction submission may have failed with Horizon.

Constructor

# new BadResponseError(message, response)

Parameters:
Name Type Description
message string

Human-readable error message.

response any

Response details, received from the server.

View Source lib/errors/bad_response.js, line 21

Extends

Members

object

# response

The response sent by the Horizon server.

Properties:
Name Type Attributes Description
response.data HorizonApi.ErrorResponseData <optional>

The data returned by Horizon as part of the error: Error Response

response.status number <optional>

HTTP status code describing the basic issue with a submitted transaction Standard Status Codes

response.statusText string <optional>

A human-readable description of what the status code means: Horizon-Specific Status Codes

response.url string <optional>

URL which can provide more information about the problem that occurred.

Overrides:

View Source lib/errors/network.js, line 35

Methods

# getResponse() → {any}

Returns the error response sent by the Horizon server.

Overrides:

View Source lib/errors/network.d.ts, line 11

any