Skip to content
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

Azure Speech Service API error handling #37713

Merged
merged 8 commits into from Nov 6, 2020
Merged

Conversation

maddiedierker
Copy link
Contributor

@maddiedierker maddiedierker commented Nov 6, 2020

This PR is a pure refactor with improvements in how we handle errors from Azure's Speech Service API (aka Cognitive Services).

Specifically, an influx of this Honeybadger error has occurred twice in the past ~3 months and has caused Applab and Gamelab projects to return 500s on load (more in the COE below).

Improvements in this PR:

  • Rescue errors gracefully for both API Requests to the Speech Service
  • Log any errors to Honeybadger
  • Adds a Gatekeeper flag so we can turn off all requests to the Speech Service without a deploy
  • Lowers the HTTP request timeouts from the default (60s) to a configurable DCDO flag (which defaults to 5s)

Links

Testing story

Adds unit tests.

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@maddiedierker maddiedierker changed the title Azure error handling Azure Speech Service API error handling Nov 6, 2020
@maddiedierker maddiedierker requested a review from a team November 6, 2020 16:59
Copy link
Member

@breville breville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with the prior code but this looks nice and clean, with some great testing too.

@maddiedierker maddiedierker merged commit c95ed65 into staging Nov 6, 2020
@maddiedierker maddiedierker deleted the azure-error-handling branch November 6, 2020 19:33
@wjordan wjordan mentioned this pull request Nov 17, 2020
8 tasks
@Hamms Hamms mentioned this pull request Sep 26, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants