Create the correct error object from a status code
Will be converted to respective error (ex. 404 -> NotFoundError)
Optional
Override default error message
The proper error type
Create the correct error object from a status code