1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/routes/client-api
andreas-unleash 6601ef19c2
fix: return 400 on incorrect client metrics input (#4193)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Wraps the whole `registerClientMetrics` function with try/catch to
return 400 on error
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #
[1-1037](https://linear.app/unleash/issue/1-1037/return-4xx-error-for-incorrect-metrics-input)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->
![Screenshot 2023-07-10 at 14 23
13](https://github.com/Unleash/unleash/assets/104830839/5417fb39-ce24-4b70-b3d3-c63374a29a12)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-07-11 12:06:28 +03:00
..
feature.test.ts feat: improve frontend config freshness to < 1s (#3749) 2023-05-12 17:52:11 +00:00
feature.ts docs: OpenAPI Client tag (#3979) 2023-06-14 12:19:00 +00:00
index.ts Personal access tokens backend (#2064) 2022-09-16 10:54:27 +03:00
metrics.test.ts Scheduler abstraction (#2829) 2023-01-11 16:15:53 +01:00
metrics.ts fix: return 400 on incorrect client metrics input (#4193) 2023-07-11 12:06:28 +03:00
register.test.ts Scheduler abstraction (#2829) 2023-01-11 16:15:53 +01:00
register.ts docs: OpenAPI Client tag (#3979) 2023-06-14 12:19:00 +00:00