Show more user friendly errors for unsupported profile version in both the frontend and the cli#6107
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6107 +/- ##
==========================================
- Coverage 83.37% 83.35% -0.03%
==========================================
Files 339 339
Lines 35929 35941 +12
Branches 10056 10058 +2
==========================================
+ Hits 29955 29957 +2
- Misses 5546 5556 +10
Partials 428 428 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| # This error message is displayed when the profile is in a newer format version | ||
| # than this build of the Profiler is able to read. | ||
| AppViewRouter--error-profile-version = | ||
| This profile was recorded in a newer format than this version of |
There was a problem hiding this comment.
Maybe we can simplify this?
AppViewRouter--error-profile-version =
This profile uses a format that is not supported by this version of { -profiler-brand-name }.
Try refreshing the page to check if there is an update available for { -profiler-brand-name }.Do you have a version number for the format to display in the error?
There was a problem hiding this comment.
Sure, updated the text.
Yeah it's included in the Error message below, but it's not localized. I thought it is too much technical detail, that's why I didn't add them, but happy to reconsider if you think otherwise.
This is the message, only the top sentence is localized and the below is coming from the thrown out error:

(currently none of our messages below are localized)
There was a problem hiding this comment.
I thought we were only showing this string. If we're showing the version number below, that works.
This will allow us to see the package name from the cli source code and suggest updating it via npm.
…h the frontend and the cli I initially wanted to add extra information to the profile version errors in the cli, because currently we don't give any hint about how to update it. But while doing that, I realized that we could also improve the error handling of the frontend a bit more. The old frontend error was a non-localized text. This commit creates a new localized text for this type of error and serializes it in a more friendly way. Probably it's a bit of an overkill for this error as it should ideally be not seen by the users, but there were existing errors with the same way, so I wanted to be consistent. Also, the cli now shows a tip about how to update the cli.
Fixes #6105
I initially wanted to add extra information to the profile version errors in the cli, because currently we don't give any hint about how to update it. But while doing that, I realized that we could also improve the error handling of the frontend a bit more.
The old frontend error was a non-localized text. This commit creates a new localized text for this type of error and serializes it in a more friendly way. Probably it's a bit of an overkill for this error as it should ideally be not seen by the users, but there were existing errors with the same way, so I wanted to be consistent.
Also, the cli now shows a tip about how to update the cli.
Frontend:

Before:
After:

CLI:

Before:
After:
