Adding in a handler for unspecified HTTP status errors from 400 to 510

Want to make sure there is a default functionality when someone halts with an error code.
Ex. If someone halts with a 400 and wants to print out "There was an error in processing", they would do the following:
error 400, "There was an error in processing"
This would produce the following json:
{
  \"errors\": [\"There was an error in processing\"]
}