Editorial workflow Improvements (#212)
* Merge conflicts automatically. Closes #208 * removed unpublished entry route All entries (either under editorial workflow or not) go through the same edit route.
This commit is contained in:
11
src/valueObjects/errors/APIError.js
Normal file
11
src/valueObjects/errors/APIError.js
Normal file
@ -0,0 +1,11 @@
|
||||
export const API_ERROR = 'API_ERROR';
|
||||
|
||||
export default class APIError extends Error {
|
||||
constructor(message, status, api) {
|
||||
super(message);
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.api = api;
|
||||
this.name = API_ERROR;
|
||||
}
|
||||
}
|
10
src/valueObjects/errors/EditorialWorkflowError.js
Normal file
10
src/valueObjects/errors/EditorialWorkflowError.js
Normal file
@ -0,0 +1,10 @@
|
||||
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;
|
||||
}
|
||||
}
|
3
src/valueObjects/errors/index.js
Normal file
3
src/valueObjects/errors/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
export { default as APIError } from './APIError';
|
||||
export { default as EditorialWorkflowError } from './EditorialWorkflowError';
|
||||
|
Reference in New Issue
Block a user