update error type
This commit is contained in:
parent
bf65923c00
commit
e8993e0de6
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
export type Error = {
|
||||
export type McUtilsAPIError = {
|
||||
/**
|
||||
* The status of the error.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user