mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
fix: broken feature.e2e test + make error message clearer (#3623)
This PR fixes a broken e2e test by relaxing what it checks for. It must have been developed in parallel so that the test wasn't included before merging into main.
This commit is contained in:
parent
b2bb5502b4
commit
0a613de308
@ -301,7 +301,7 @@ export const fromOpenApiValidationErrors = (
|
||||
return new UnleashError({
|
||||
name: 'ValidationError',
|
||||
message:
|
||||
"The request payload you provided doesn't conform to the schema. Check the `details` property for a list of errors that we found.",
|
||||
"Request validation failed: the payload you provided doesn't conform to the schema. Check the `details` property for a list of errors that we found.",
|
||||
// @ts-expect-error We know that the list is non-empty
|
||||
details,
|
||||
});
|
||||
|
@ -916,6 +916,7 @@ test('Should throw error when updating a flexibleRollout strategy with "" for st
|
||||
.expect((res) => {
|
||||
const result = res.body;
|
||||
expect(res.status).toBe(400);
|
||||
expect(result.error).toBe('Request validation failed');
|
||||
expect(result.message.includes('validation'));
|
||||
expect(result.message.includes('failed'));
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user