Returns status code with exception