Use friendly error messages in "x is undefined" cases
See original GitHub issueTypeError: Cannot read property '_timing' of undefined
File "/usr/lib/node_modules/lighthouse/lighthouse-core/audits/time-to-first-byte.js", line 29, col 26, in Function.caclulateTTFB
const timing = record._timing;
File "/usr/lib/node_modules/lighthouse/lighthouse-core/audits/time-to-first-byte.js", line 47, col 33, in artifacts.requestNetworkRecords.then
const ttfb = TTFBMetric.caclulateTTFB(finalUrlRequest);
File "internal/process/next_tick.js", line 135, col 7, in process._tickDomainCallback
https://sentry.io/google-lighthouse/lighthouse/issues/407357986/
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error handling - Apollo GraphQL Docs
Throwing errors For example, it throws a GRAPHQL_VALIDATION_FAILED error whenever an incoming operation isn't valid against the server's schema. Your resolvers ...
Read more >jQuery Ajax error handling, show custom exception messages
Custom exception ModelStateException that gets thrown when validation fails on the server (model state reports validation errors when we use data ...
Read more >A Guide to Error Handling in Express.js | Scout APM Blog
Error handling often doesn't get the attention it deserves. Mishandled errors can lead to a bad UX and negatively affect your business.
Read more >Errors and Exceptions in Haskell - Stack Builders
In Haskell, we have error and undefined to cause such errors and terminate execution of the program.
Read more >Fixing Compilation Errors - GAMS
Error K: Using Undefined Data Note that the scalar f was declared, but there was no value assigned to it. Thus, when it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah basically the bug is on the error message, not the error existing. Not much we can do in that audit if we couldn’t find the request 😃
IMO we should try to minimize the debugStrings in the report that are of the form ‘blah of undefined’ and try to say what happened, like “Unable to identify the main resource” or something
Well we have better network request fallbacks for timing info, so hopefully we have more intelligible error messages if anyone is still hitting this case 😃