1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib
Christopher Kolstad 063d3f0e4a
Make feature-toggle-store return 409
- After seeing frontend behaviour where the user could add the same
tag multiple times, and not get errors or be stopped doing so, we'll
change the backend to return a 409 if you tag a feature with a tag it
already has.

- Previous to this commit, the setup was to do `onConflict().ignore()`
  which caused the frontend to not get any help from the backend as to
  whether or not the operation was allowed

- This fix adds a custom error and adds a branch to the handleError util
  method for handling just that error type with a 409.

- This caused a couple of tests to receive 409, probably due to
  insufficient cleanup between tests. Adding faker as a dev-dependency and randomising
  toggle names and tag values for each test reduces the chance that
  we'll run into duplicate issues in the future for the tests that
  touches this problem

fixes: #711
2021-02-08 16:22:15 +01:00
..
addons fix: hide jira addon for now 2021-02-05 15:20:00 +01:00
db Make feature-toggle-store return 409 2021-02-08 16:22:15 +01:00
error Make feature-toggle-store return 409 2021-02-08 16:22:15 +01:00
middleware fix: typo in message in simple-authentication.js (#707) 2021-02-04 12:21:08 +01:00
routes Make feature-toggle-store return 409 2021-02-08 16:22:15 +01:00
services fix: Add a test for validation of empty params 2021-02-05 15:20:00 +01:00
util fix: version should be part of ui-config (#616) 2020-08-03 13:34:10 +02:00
app.js fix: stateService undefined 2020-12-17 19:43:01 +01:00
app.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
authentication-required.js fix: add 'options' field to AuthenticationRequired 2020-05-14 22:32:33 +02:00
event-differ.js feat: Introduce addon framework 2021-02-05 15:20:00 +01:00
event-differ.test.js feat: Introduce addon framework 2021-02-05 15:20:00 +01:00
event-hook.js feat: add option and functionality that allows a user to hook into feature mutations (#457) 2020-02-20 08:34:26 +01:00
event-hook.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
event-type.js Added explicit pool settings in options.db object 2021-02-08 10:54:20 +01:00
events.js feat: add db query latency metrics (#473) 2020-02-20 08:34:27 +01:00
extract-user.js fix: add user-store (#590) 2020-05-12 23:05:26 +02:00
logger.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
logger.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
metrics-helper.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
metrics.js Added explicit pool settings in options.db object 2021-02-08 10:54:20 +01:00
metrics.test.js Added explicit pool settings in options.db object 2021-02-08 10:54:20 +01:00
missing-permission.js Use full name instead of perms, 403 error message now includes expected permission 2020-02-20 08:34:19 +01:00
options.js Added explicit pool settings in options.db object 2021-02-08 10:54:20 +01:00
options.test.js Added explicit pool settings in options.db object 2021-02-08 10:54:20 +01:00
permissions.js feat: Introduce addon framework 2021-02-05 15:20:00 +01:00
server-impl.js fix: stateService undefined 2020-12-17 19:43:01 +01:00
server-impl.test.js feat: Adds last-seen dat on toggles 2020-12-22 11:05:00 +01:00
timer.js feat: add db query latency metrics (#473) 2020-02-20 08:34:27 +01:00
timer.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
user.js fix: replace @hapi/joi with joi 2020-07-31 22:15:09 +02:00
user.test.js fix: add user-store (#590) 2020-05-12 23:05:26 +02:00