mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 07:50:07 +00:00
* feat(meister): add automod * fix(test); rest error with code * fix(rest): log error nicely * fix(test): disable benchmark test until gateway rewrite * fix(automod): enum should start with 1 * fix(helper): better undefined handling of metadata * fix(transfomrers): automod transformers * fix(tests): add some automod tests * Update types/shared.ts Co-authored-by: meister03 <69507874+meister03@users.noreply.github.com> * fix: changes discord made recently * fix(fmt): i hate deno fmt but i love itoh Co-authored-by: meister03 <69507874+meister03@users.noreply.github.com> Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
7 lines
234 B
TypeScript
7 lines
234 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;
|
|
}
|