1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/lib/routes/admin-api
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
..
addon.js feat: Introduce addon framework 2021-02-05 15:20:00 +01:00
api-def.json Add Tags and tag types 2021-01-14 13:09:05 +01:00
archive.js Add service layer 2021-01-21 10:59:19 +01:00
archive.test.js feat: Added tags to events table and emitted events 2021-01-29 09:53:27 +01:00
config.js fix: version should be part of ui-config (#616) 2020-08-03 13:34:10 +02:00
config.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
context-schema.js fix: context legalValues should be at max 100 chars 2020-10-04 20:36:40 +02:00
context.js fix: use validated and stripped data when updating 2020-10-01 22:40:47 +02:00
context.test.js fix: failing tests for 409 2020-09-25 22:31:35 +02:00
event.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
events.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
feature-type.js feat: Add support for toggle types (#618) 2020-08-06 11:18:52 +02:00
feature.js feat: Add filterquery support for toggles 2021-01-26 14:14:07 +01:00
feature.test.js feat: Added tags to events table and emitted events 2021-01-29 09:53:27 +01:00
index.js feat: Introduce addon framework 2021-02-05 15:20:00 +01:00
metrics.js fix: should wait for seen apps 2021-02-04 15:54:29 +01:00
metrics.test.js Add service layer 2021-01-21 10:59:19 +01:00
state.js fix: stateService undefined 2020-12-17 19:43:01 +01:00
strategy.js Make sure we deny deprecating default strategy 2021-01-22 10:03:01 +01:00
strategy.test.js Make sure we deny deprecating default strategy 2021-01-22 10:03:01 +01:00
tag-type.js Add service layer 2021-01-21 10:59:19 +01:00
tag.js Add service layer 2021-01-21 10:59:19 +01:00
tag.test.js Add service layer 2021-01-21 10:59:19 +01:00
user.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
user.test.js fix: use airbnb lint rules directly (#583) 2020-04-14 22:29:11 +02:00
util.js Make feature-toggle-store return 409 2021-02-08 16:22:15 +01:00