ensure status code is checked, even if an exception is thrown