We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
The TeensyPHP router() function contains an error handler. Simply throw an exception or error with the corresponding code eg:
router()
throw new \Error("Something went wrong", 500);
TeensyPHP in this case will output the following error with a status code of 500:
{ "error": "Something went wrong" }