mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-04 01:18:20 +02:00
fix: tag validation duplicate message (#1756)
This commit is contained in:
parent
e0557a6e5d
commit
f96b4525a5
@ -112,7 +112,7 @@ class FeatureTagStore implements IFeatureTagStore {
|
||||
.catch((err) => {
|
||||
if (err.code === UNIQUE_CONSTRAINT_VIOLATION) {
|
||||
throw new FeatureHasTagError(
|
||||
`${featureName} already had the tag: [${tag.type}:${tag.value}]`,
|
||||
`${featureName} already has the tag: [${tag.type}:${tag.value}]`,
|
||||
);
|
||||
} else {
|
||||
throw err;
|
||||
|
@ -748,7 +748,7 @@ test('Tagging a feature with a tag it already has should return 409', async () =
|
||||
.expect(409)
|
||||
.expect((res) => {
|
||||
expect(res.body.details[0].message).toBe(
|
||||
`${feature1Name} already had the tag: [${tag.type}:${tag.value}]`,
|
||||
`${feature1Name} already has the tag: [${tag.type}:${tag.value}]`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -77,7 +77,7 @@ test('should throw if feature have tag', async () => {
|
||||
try {
|
||||
await featureTagStore.tagFeature(featureName, tag);
|
||||
} catch (e) {
|
||||
expect(e.message).toContain('already had the tag');
|
||||
expect(e.message).toContain('already has the tag');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user