Create API Routes with Radicle

Hello, I am creating a simple API route through the Radicle structure, but I am encountering some problems related to routing errors to the 404 template, whenever in my code structure I have an exception for errors such as 400, 401 and 402 , it is returning the 404 error to me.

I even found a snippet of code in the Bootloader on Acorn that when I change it to greater than 404 my errors below it work by correctly returning via POST or GET the configured message and status code.

Captura de Tela 2023-10-21 às 00.40.35

Would it be possible for me to update this section inside my Radicle with action or create a middleware?

Hey there, sorry about the router issues you’re running into — we’re still ironing out some things

It looks like you’re running into a similar problem as Bug: Routes incompatible with ValidationException · Issue #288 · roots/acorn · GitHub

Somewhat related: https://github.com/roots/acorn/issues/276

And: https://github.com/roots/acorn/pull/291

Once these are pushed through you’ll hopefully be able to do what you’re attempting