Extends
- Error
Members
code :number
HTTP error code returned by Discord
Type:
- number
- Source:
httpStatus :number
The HTTP status code
Type:
- number
- Source:
method :string
The HTTP method used for the request
Type:
- string
- Source:
path :string
The path of the request relative to the HTTP endpoint
Type:
- string
- Source:
Methods
(private, static) flattenErrors(obj, keyopt) → {Array.<string>}
Flattens an errors object returned from the API into an array.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | Discord errors object | |
key |
string |
<optional> |
Used internally to determine key names of nested fields |
- Source:
Returns:
- Type
- Array.<string>