# Create API Routes with Radicle

**URL:** https://discourse.roots.io/t/create-api-routes-with-radicle/26164
**Category:** radicle
**Created:** 2023-10-21T16:38:25Z
**Posts:** 2

## Post 1 by @rhenan_lm — 2023-10-21T16:38:25Z

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 às 00.40.35](https://discourse.roots.io/uploads/default/original/2X/c/cd101449be9ce6068f552a387e9ccdaecc079e26.png)

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

---

## Post 2 by @ben — 2023-10-22T14:25:30Z

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](https://github.com/roots/acorn/issues/288)

Somewhat related: [https://github.com/roots/acorn/issues/276](https://github.com/roots/acorn/issues/276)

And: [https://github.com/roots/acorn/pull/291](https://github.com/roots/acorn/pull/291)

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