From e8993e0de6d784013938564e25b4fd7fa44112fe Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 16 Apr 2024 23:32:06 +0100 Subject: [PATCH] update error type --- src/common/WebRequest.ts | 4 ++-- src/types/error.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/WebRequest.ts b/src/common/WebRequest.ts index 7b418f3..417c8d2 100644 --- a/src/common/WebRequest.ts +++ b/src/common/WebRequest.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { Error } from "../types/error"; +import { McUtilsAPIError } from "../types/error"; export default class WebRequest { /** @@ -21,7 +21,7 @@ export default class WebRequest { // Reject if the status code is not 200 if (response.status !== 200) { - reject(data as Error); + reject(data as McUtilsAPIError); return; } diff --git a/src/types/error.ts b/src/types/error.ts index 692d3bb..cc63dde 100644 --- a/src/types/error.ts +++ b/src/types/error.ts @@ -1,4 +1,4 @@ -export type Error = { +export type McUtilsAPIError = { /** * The status of the error. */