fix response code handling in cas operation.