-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verification: elegant methods for callouts #26
Conversation
method=response.body.get("method"), | ||
_links=response.body.get("_links"), | ||
sms=SMSResponse( | ||
interception_timeout=response.body["sms"].get("interceptionTimeout"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can expect the server to always return this field, but it's noted as optional in the specification. Wouldn't it be safer to check for the existence of the sms
property before reading sub-properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some additional logic.
No description provided.