rawleyfowler / Humming-Bird

A fun and performant web application framework for Raku
MIT License
44 stars 6 forks source link

Global error handler/error handling middleware #9

Closed rawleyfowler closed 1 year ago

rawleyfowler commented 1 year ago

Right now if the program dies, it dies. We should be able to catch these errors and handle them based on how the user of the library wants. Note the internal code will not die, but rather in the handlers of the defined routes. Ideally the errors in routing code (ie. userspace code), will be caught and translated into a 500 of some kind.

rawleyfowler commented 1 year ago

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/ControllerAdvice.html

rawleyfowler commented 1 year ago

I am interested in implementing something like Spring Boot's ControllerAdvice. ^^