Compare commits
2 Commits
bf65923c00
...
fb8ab8d7aa
Author | SHA1 | Date | |
---|---|---|---|
fb8ab8d7aa | |||
e8993e0de6 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mcutils-library",
|
"name": "mcutils-library",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { Error } from "../types/error";
|
import { McUtilsAPIError } from "../types/error";
|
||||||
|
|
||||||
export default class WebRequest {
|
export default class WebRequest {
|
||||||
/**
|
/**
|
||||||
@ -21,7 +21,7 @@ export default class WebRequest {
|
|||||||
|
|
||||||
// Reject if the status code is not 200
|
// Reject if the status code is not 200
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
reject(data as Error);
|
reject(data as McUtilsAPIError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export type Error = {
|
export type McUtilsAPIError = {
|
||||||
/**
|
/**
|
||||||
* The status of the error.
|
* The status of the error.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user