@vitrical/utils
Advanced tools
Comparing version 1.2.7 to 1.2.8
import superagent from 'superagent'; | ||
export declare class ApiError extends Error { | ||
url: string; | ||
status: superagent.Response['status']; | ||
status: number; | ||
body: { | ||
[key: string]: any; | ||
} | string; | ||
headers: superagent.Response['headers']; | ||
headers: { | ||
[key: string]: any; | ||
}; | ||
msg: string; | ||
} | ||
@@ -10,0 +13,0 @@ export declare const handleSuperagentError: (url: string, newStack: string, err: unknown, res?: superagent.Response) => ApiError | Error | unknown; |
@@ -40,2 +40,3 @@ "use strict"; | ||
apiError.url = url; | ||
apiError.msg = res.body?.msg || ''; | ||
return apiError; | ||
@@ -42,0 +43,0 @@ } |
{ | ||
"name": "@vitrical/utils", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "Collection of useful functions and typings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,3 +24,2 @@ { | ||
"noImplicitReturns": true, | ||
"importsNotUsedAsValues": "error", | ||
"noEmitOnError": true | ||
@@ -27,0 +26,0 @@ }, |
Sorry, the diff of this file is not supported yet
47702
821