This represents a generic error from an ArcGIS endpoint. There will be details about the error in the ArcGISRequestError.message
, ArcGISRequestError.originalMessage
properties on the error. You can also access the original server response at ArcGISRequestError.response
which may have additional details.
Use dark colors for code blocks Copy
1
2
3
4
5
6
request(someUrl, someOptions).catch(e => {
if(e.name === "ArcGISRequestError") {
console.log("Something went wrong with the request:", e);
console.log("Full server response", e.response);
}
})
Inheritance: ArcGISRequestError Error
Constructors constructor Class Constructornew ArcGISRequestError(message?: string,âcode?: string | number,âresponse?: any,âurl?: string,âoptions?: IRequestOptions): ArcGISRequestError
Create a new ArcGISRequestError
object.
message
string
The error message from the API
code
string | number
The error code from the API
response
any
The original response from the API that caused the error
url
string
The original url of the request
options
IRequestOptions
The original options and parameters of the request
ReturnsÂArcGISRequestError
Properties Property Type Notes code
string | number
The error code returned from the request.
message
string
Formatted error message. See the Error
class for more details.
name
string
The name of this error. Will always be "ArcGISRequestError"
to conform with the Error
class.
options
IRequestOptions
The options of the original request that caused the error
originalMessage
string
The errror message return from the request.
response
any
The original JSON response the caused the error.
url
string
The URL of the original request that caused the error
code Class Propertycode: string | number
The error code returned from the request.
message Class Propertymessage: string
Formatted error message. See the Error
class for more details.
name: string
The name of this error. Will always be "ArcGISRequestError"
to conform with the Error
class.
options: IRequestOptions
The options of the original request that caused the error
originalMessage Class PropertyoriginalMessage: string
The errror message return from the request.
response Class Propertyresponse: any
The original JSON response the caused the error.
url Class Propertyurl: string
The URL of the original request that caused the error
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4