Why don't you use this:

```python
change_password.raise_for_status()
```

And that way you don't have to check for all the 2XX good status codes?