runTimeError exists when there are NO_ERRORs
See original GitHub issueRan into this working on a web server that returns LH results. It’s unexpected that runTimeErrors
exists in the LHR if there were no errors! It also requires users to check for a “NO_ERROR” string code which overcomplicates matters.
if (lhr.runtimeError && lhr.runtimeError.code !== 'NO_ERROR') {
throw new Error(`${lhr.runtimeError.code} ${lhr.runtimeError.message}`);
}
Environment Information
- Affected Channels: all
- Lighthouse version: 3.2.1
- Node.js version: 10+
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
What happens when there is a javascript runtime error?
An uncaught runtime error only stops the current execution, which may be. the execution of a script; the call of an event handler....
Read more >How to Solve the Most Common Runtime Errors in Java | Rollbar
A runtime error occurs when a program is syntactically correct but contains an issue that is only detected during program execution.
Read more >What is a Runtime Error? — Definition by Techslang
A runtime error occurs when a program you're using or writing crashes or produces a wrong output. There are several types of runtime...
Read more >Runtime Errors - GeeksforGeeks
Runtime Errors: A runtime error in a program is an error that occurs while the program is running after being successfully compiled.
Read more >1E: Errors | Computer Science Circles - University of Waterloo
A syntax error happens when Python can't understand what you are saying. A run-time error happens when Python understands what you are saying,...
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
I’m not really satisfied with the node outcome right now. Eliminating the
"runtimeError": {"code": "NO_ERROR"}
was the original point of the issue I believe, so seeing that through in all environments seems reasonable.I think I still stand by my opinions/suggestions in https://github.com/GoogleChrome/lighthouse/issues/6336#issuecomment-443876702, so good to see a few months hasn’t changed me too much 😃
So @patrickhulce response made me look more into the LR errors, and I finally found the root cause (#6739)! So I am going to table more advanced error handling (#6671) for later. But I definitely think that PSI error handling needs to be re-evaluated next, but I’m going to leave LH CLI, node and others for later.