This commit is contained in:
17
node_modules/decap-cms-lib-util/src/APIError.ts
generated
vendored
Normal file
17
node_modules/decap-cms-lib-util/src/APIError.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export const API_ERROR = 'API_ERROR';
|
||||
|
||||
export default class APIError extends Error {
|
||||
message: string;
|
||||
status: null | number;
|
||||
api: string;
|
||||
meta: {};
|
||||
|
||||
constructor(message: string, status: null | number, api: string, meta = {}) {
|
||||
super(message);
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.api = api;
|
||||
this.name = API_ERROR;
|
||||
this.meta = meta;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user