Members
Array.<number>
# STATUS_CODES_TO_ABORT_ON
Defines an array of HTTP status codes that the application should not attempt to reconnect to Mastodon on.
Defines an array of HTTP status codes that the application should not attempt to reconnect to Mastodon on.
Methods
# attachBodyInfoToError(err, body)
Attach error information from the response body to the error object.
Attach error information from the response body to the error object.
Parameters:
Name | Type | Description |
---|---|---|
err |
Error
|
Error instance to which body info will be attached. |
body |
Object
|
JSON object that is the deserialized HTTP response body received from Mastodon. |
# makeMastodonError(messageopt) → {Error}
Create a new Mastodon error object.
Create a new Mastodon error object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string
|
<optional> |
Optional error message. |
A new error object.
Error
# moveParamsIntoPath(params, path) → {string}
For each /:param
fragment in path, move the value in params
at that key to path.
For each /:param
fragment in path, move the value in params
at that key to path. If the key is not found in params, throw.
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Object used to build path. |
path |
string
|
String to transform. |
Modified path
string