add status code to failed exception