What runtime/platform is your app running on? (with version if possible)
Bun
What steps can reproduce the bug?
I am sending a multipart/form-data request from capacitor.js app in android to my hono backend. But my Hono app throwing an error upon receiving this request. My json post requests are working absolutely fine from this android app and our website. But formData request not succeeding for android app.
What version of Hono are you using?
4.6.3
What runtime/platform is your app running on? (with version if possible)
Bun
What steps can reproduce the bug?
I am sending a multipart/form-data request from capacitor.js app in android to my hono backend. But my Hono app throwing an error upon receiving this request. My json post requests are working absolutely fine from this android app and our website. But formData request not succeeding for android app.
What is the expected behavior?
No response
What do you see instead?
I am getting the following error in my Hono app :
error-handler ran haiga-api-all | 1 | // src/http-exception.ts haiga-api-all | 2 | var HTTPException = class extends Error { haiga-api-all | 3 | res; haiga-api-all | 4 | status; haiga-api-all | 5 | constructor(status = 500, options) { haiga-api-all | 6 | super(options?.message, { cause: options?.cause }); haiga-api-all | ^ haiga-api-all | error: Error haiga-api-all | at new HTTPException (/app/node_modules/hono/dist/http-exception.js:6:5) haiga-api-all | at /app/node_modules/hono/dist/middleware/csrf/index.js:28:13 haiga-api-all | at csrf2 (/app/node_modules/hono/dist/middleware/csrf/index.js:23:31) haiga-api-all | at /app/node_modules/hono/dist/compose.js:30:23 haiga-api-all | at dispatch (/app/node_modules/hono/dist/compose.js:8:32) haiga-api-all | at /app/node_modules/hono/dist/hono-base.js:195:31 haiga-api-all | at /app/node_modules/hono/dist/hono-base.js:193:13 haiga-api-all |
Additional information
It looks like csrf middleware is causing the problem.
No response