Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

adds error handling to performance metrics collection #4573

Merged
merged 5 commits into from
Oct 6, 2021

Conversation

jroebu14
Copy link
Contributor

@jroebu14 jroebu14 commented Oct 5, 2021

Overall change:
Prevents performance metrics collection functions from causing errors.

This should prevent the crash we get in Simorgh in Opera Mini extreme data saving mode.

Code changes:

  • Adds a try/catch around web-vitals functions
  • The hook now returns an object with error state

  • (BBC contributors only) This PR follows the repository use guidelines
  • I have assigned myself to this PR and the corresponding issues
  • Automated jest tests added (for new features) or updated (for existing features)
  • This PR requires manual testing

@jroebu14 jroebu14 self-assigned this Oct 5, 2021
@jroebu14 jroebu14 added the technical-work Technical debt, support work and building new technical tools and features label Oct 5, 2021
@jroebu14 jroebu14 marked this pull request as ready for review October 5, 2021 12:58
@jroebu14 jroebu14 merged commit 1b13557 into latest Oct 6, 2021
@jroebu14 jroebu14 deleted the web-vitals-error-handling branch October 6, 2021 07:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
technical-work Technical debt, support work and building new technical tools and features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants