JSON error reporting in routing