Functions lab: Throw a meaningful exception when the vision API request fails.#191
Open
mattmccutchen-microsoft wants to merge 1 commit intoMSRConnections:masterfrom
Conversation
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.
I worked an older version of the Functions lab today (before 1471b0c) and chose the wrong region for the vision API, so my function failed with a NullReferenceException and it took me a while to track down the problem. I see how that you've already addressed that pitfall by making the vision endpoint an app setting. It may still be useful to add proper error reporting in case anything else goes wrong with the vision API. I tested that this code throws a useful exception that shows up on the function's Monitor page in the portal when I deliberately set the wrong SubscriptionKey.
I didn't update the HTML version of the document because a quick attempt to generate it using MarkdownPad produced a ton of unrelated diffs. I'm probably missing something. If you'd like contributors to be able to update the HTML files, please consider documenting the proper procedure.