mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 18:00:08 +00:00
fix(rest): improve errors
This commit is contained in:
@@ -44,8 +44,8 @@ export async function runMethod<T = any>(
|
||||
{
|
||||
url,
|
||||
method,
|
||||
reject: (error) => {
|
||||
console.error(error);
|
||||
reject: (error: unknown) => {
|
||||
errorStack.message = (error as Error)?.message;
|
||||
reject(errorStack);
|
||||
},
|
||||
respond: (data: { status: number; body?: string }) =>
|
||||
|
||||
Reference in New Issue
Block a user