Ensure that a valid responsecode is returned