mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
949a5f0109
This PR updates the OpenAPI error converter to also work for errors with query parameters. We previously only sent the body of the request along with the error, which meant that query parameter errors would show up incorrectly. For instance given a query param with the date format and the invalid value `01-2020-01`, you'd previously get the message: > The `from` value must match format "date". You sent undefined With this change, you'll get this instead: > The `from` value must match format "date". You sent "01-2020-01". The important changes here are two things: - passing both request body and query params - the 3 lines in `fromOpenApiValidationError` that check where we should get the value you sent from. The rest of it is primarily updating tests to send the right arguments and some slight rewording to more accurately reflect that this can be either request body or query params. |
||
---|---|---|
.. | ||
lib | ||
mailtemplates | ||
migrations | ||
test | ||
migrator.ts | ||
server-dev.ts | ||
server.ts |