Is there a (simple) solution to customize the text in the debug window? Maybe even display the logo or something similar?
Ok, that was almost too easy now Thanks so much Sonja!
This seems to work with templates.
Is there a way to customize the response message from a route, if there’s a php error?
In my JS-App I still get this, when making a fetch request:
// json response from route
{
"status": "error",
"code": 2,
"details": null,
"message": "An unexpected error occurred! Enable debug mode for more info: https://getkirby.com/docs/reference/system/options/debug"
}
But I basically want to return this message (no matter if debug & whoops are enabled or not) only if a user/admin is logged in.
The only thing that might work is to enable debugging conditionally. But shouldn’t you handle such errors in your frontend app?