You are reading the documentation for the
next
version of discord.js. Documentation for v13/v14+ has been moved to
old.discordjs.dev
/
docs
/
packages
/
proxy
/
main
/
populateErrorResponse%3AFunction
Search...
K
proxy
discord.js
brokers
builders
collection
core
formatters
next
proxy
rest
util
voice
ws
main
main
Functions
populateAbortErrorResponse
populateErrorResponse
populateGeneralErrorResponse
populateRatelimitErrorResponse
populateSuccessfulResponse
proxyRequests
Types
RequestHandler
populateErrorResponse
export declare function
populateErrorResponse
(
res
:
ServerResponse
,
error
:
unknown
)
:
boolean
;
export declare function
populateErrorResponse
(res
:
ServerResponse
,
error
:
unknown
)
:
boolean
;
Summary
Tries to populate a server response from an error object
Returns
- True if the error is known and the response object was populated, otherwise false
Parameters
Name
Type
Optional
Description
res
ServerResponse
No
The server response to populate
error
unknown
No
The error to check and use