move errors to utils lib
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
export const API_ERROR = 'API_ERROR';
|
||||
|
||||
export default class APIError extends Error {
|
||||
constructor(message, status, api, meta={}) {
|
||||
super(message);
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.api = api;
|
||||
this.name = API_ERROR;
|
||||
this.meta = meta;
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
export const EDITORIAL_WORKFLOW_ERROR = 'EDITORIAL_WORKFLOW_ERROR';
|
||||
|
||||
export default class EditorialWorkflowError extends Error {
|
||||
constructor(message, notUnderEditorialWorkflow) {
|
||||
super(message);
|
||||
this.message = message;
|
||||
this.notUnderEditorialWorkflow = notUnderEditorialWorkflow;
|
||||
this.name = EDITORIAL_WORKFLOW_ERROR;
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
export { default as APIError } from './APIError';
|
||||
export { default as EditorialWorkflowError } from './EditorialWorkflowError';
|
||||
|
Reference in New Issue
Block a user