fix(rest): improve errors

This commit is contained in:
Tricked
2021-12-20 19:19:36 +01:00
parent facb3f7ef3
commit 5d71cb5a1c

View File

@@ -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 }) =>