webservice: get_recording_url_list error handling - #709
Merged
Conversation
We need get_recording_url_list() to return an array of recordings. So when the API gives us an error message that means "there are no recordings", then we need to return an empty array (so that it matches). If the API gives us an error message that means "there was a problem when we tried to find the recordings", then we don't want to pretend that we know how many recordings there are (so we allow other exception types to bubble up). Finally, if there was no API error message, then we should have an API response that we can use. However, the code is written to assume that we know how the API response is structured. If the code is in the structure that we expect, then use it. Otherwise, we should throw our own "unexpected response structure" error message to avoid returning incorrect information.
cbounphengsy
approved these changes
Apr 16, 2026
cbounphengsy
left a comment
Contributor
There was a problem hiding this comment.
If any related issues related arise, the added error-handling will allow us to narrow down the cause.
Collaborator
|
Thank you for this fix! Now we wait for AWS to go down again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need get_recording_url_list() to return an array of recordings. So when the API gives us an error message that means "there are no recordings", then we need to return an empty array (so that it matches). If the API gives us an error message that means "there was a problem when we tried to find the recordings", then we don't want to pretend that we know how many recordings there are (so we allow other exception types to bubble up). Finally, if there was no API error message, then we should have an API response that we can use. However, the code is written to assume that we know how the API response is structured. If the code is in the structure that we expect, then use it. Otherwise, we should throw our own "unexpected response structure" error message to avoid returning incorrect information.
Fixes #684
Fixes #704