seyfert/packages/discordeno/rest/convertRestError.ts
Yuzu b15666f20e
chore: use single quotes (#68)
* chore: single quote
2022-07-18 18:25:23 +00:00

7 lines
238 B
TypeScript

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