Creates easy to use JSON HTTP errors for use in api's