Better routing for error handling