use the exception to generate the status code