mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
provides a more helpful error msg when a new feature is created with an existing name
This commit is contained in:
parent
ef1270ddf6
commit
6a4f453713
@ -20,7 +20,7 @@ const handleErrors = (req, res, error) => {
|
|||||||
case NameExistsError:
|
case NameExistsError:
|
||||||
return res
|
return res
|
||||||
.status(403)
|
.status(403)
|
||||||
.json([{ msg: `A feature named '${req.body.name}' already exists.` }])
|
.json([{ msg: 'A feature with this name already exists. Try re-activating it from the archive.' }])
|
||||||
.end();
|
.end();
|
||||||
case ValidationError:
|
case ValidationError:
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user