Rather than call and then check a response code, use `try ... except ...` to provide more context to errors.