Files
discordeno/rest/convertRestError.ts
2022-05-24 22:01:44 +02:00

7 lines
220 B
TypeScript

import { RestRequestRejection } from "./rest.ts";
export function convertRestError(errorStack: Error, data: RestRequestRejection): Error {
errorStack.message = `[${data.status}] ${data.error}`;
return errorStack;
}