Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hono): safely parse request body #768

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

marbemac
Copy link
Contributor

@marbemac marbemac commented Jun 7, 2024

The web UI does not include a request body in most of its requests to the API. Hono's c.req.json() method throws if it cannot parse the body (at least on v4, I noticed bull-board is still on v3). This causes all of the mutations in the UI to fail, except for those that include a body such as adding a job.

This PR is a small change to safely attempt to parse the request body.

Signed-off-by: Marc MacLeod <marbemac+gh@gmail.com>
@felixmosh felixmosh merged commit 891c250 into felixmosh:master Jun 7, 2024
@felixmosh
Copy link
Owner

Thank you for your contribution 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants