mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
chore: change ApplicationError to ValidationError
This commit is contained in:
parent
bfc379347b
commit
8ec6726c93
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const { set } = require('lodash/fp');
|
||||
const { ApplicationError } = require('@strapi/utils').errors;
|
||||
const { ValidationError } = require('@strapi/utils').errors;
|
||||
const { WORKFLOW_MODEL_UID } = require('../../constants/workflows');
|
||||
const { getService } = require('../../utils');
|
||||
|
||||
@ -16,7 +16,7 @@ module.exports = ({ strapi }) => ({
|
||||
|
||||
async create(opts) {
|
||||
if (!opts.data.stages) {
|
||||
throw new ApplicationError('Can not create a workflow without stages');
|
||||
throw new ValidationError('Can not create a workflow without stages');
|
||||
}
|
||||
|
||||
const stageIds = await getService('stages', { strapi })
|
||||
|
Loading…
x
Reference in New Issue
Block a user