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
resServerResponseNo
The server response to populate
errorunknownNo
The error to check and use