Catch errors in middleware
Unanswered
Crucian carp posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Crucian carpOP
How do I catch errors in my middleware ?
Can I just add an error.tsx in my src directory?
Can I just add an error.tsx in my src directory?
2 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Crucian carpOP
Bump
![Avatar](https://cdn.discordapp.com/avatars/227874586312704000/8b08fc3388d22e2ce6b4fa0b1f60f6ad.webp?size=256)
josh
You mean catch errors that happen during the middleware? You would wrap them in
try...catch