You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

populateErrorResponse

export declare function populateErrorResponse(res: ServerResponse, error: unknown): boolean;
export declare function populateErrorResponse(res: ServerResponse, error: unknown): boolean;
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
NameTypeOptionalDescription
resServerResponseNoThe server response to populate
errorunknownNoThe error to check and use