felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.14k stars 343 forks source link

fix(hono): safely parse request body #768

Closed marbemac closed 4 weeks ago

marbemac commented 4 weeks ago

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.

felixmosh commented 4 weeks ago

Thank you for your contribution 🙏🏼