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