move errors to utils lib

This commit is contained in:
Shawn Erquhart
2018-07-16 23:08:16 -04:00
parent 4931711892
commit e491f2a085
10 changed files with 17 additions and 15 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -1,3 +0,0 @@
export { default as APIError } from './APIError';
export { default as EditorialWorkflowError } from './EditorialWorkflowError';