mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: cleaned node
This commit is contained in:
1 parent
01ed20941d
commit
ab5061ba99
28 files changed
+35
-37
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import errorWithCause from '../node/errorWithCause.js';
|
||||
import throwError from '../node/throwError.js';
|
||||
|
||||
export type WargamingResponse<Data extends object> =
|
||||
| {
|
||||
@@ -21,7 +21,7 @@ export default async function getWargamingResponse<Data extends object>(
|
||||
if (parsed.status === 'ok') {
|
||||
return parsed.data;
|
||||
} else {
|
||||
throw errorWithCause(
|
||||
throw throwError(
|
||||
`Wargaming response error status:"${parsed.status}"`,
|
||||
`Message: "${parsed.error.message}"\nURL: "${url}"`,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user