-
Notifications
You must be signed in to change notification settings - Fork 117
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
add error handling in conference get and list #230
base: master
Are you sure you want to change the base?
Conversation
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.
You should update the PHPDoc at line 49 to:
@throws PlivoRestException|PlivoValidationException
if($response->getThrownException() != null) { | ||
throw $response->getThrownException(); | ||
} |
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.
This would be shorter and more idiomatic:
if($response->getThrownException() != null) { | |
throw $response->getThrownException(); | |
} | |
if(!$response->ok()) { | |
throw $response->getThrownException(); | |
} |
if($response->getThrownException() != null) { | ||
throw $response->getThrownException(); | ||
} |
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.
if($response->getThrownException() != null) { | |
throw $response->getThrownException(); | |
} | |
if(!$response->ok()) { | |
throw $response->getThrownException(); | |
} |
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.
suggestions are valid.
@huzaif-plivo requesting to make review change
No description provided.