[x-license] Improve the error messages #1364
Labels
docs
Improvements or additions to the documentation
dx
Related to developers' experience
package: x-license
Specific to @mui/x-license.
plan: Premium
Impact at least one Premium user
plan: Pro
Impact at least one Pro user
Summary 💡
The license key was introduced to improve the DX. This issue is about exploring all the opportunities that we have to exploit the concept.
Opportunites 🌈
showInvalidLicenseKeyError()
could log the license key used, the npm package that requires it too.showExpiredPackageVersionError()
could log the plan, the npm package, the license key used, the expiration date of their license, the release date, and the version of the package if the source of the problem. It would give a lot more context for the developers to find the solution.showExpiredPackageVersionError()
could log the maintenance end date of the current key and the license key used.showNotAvailableInInitialProPlanError()
could log what's exactly not available. It's confusing without.Done
1. Developers using the fake license key in https://mui.com/x/introduction/licensing/#how-to-install-the-key
https://codesandbox.io/s/material-demo-forked-t81rv?file=/demo.js
Solved in [docs] Avoid confusion with license key installation #4891.
2.
showNotFoundLicenseError
: Lack of context about which npm package is triggering the license key not found.Solved in [license] Give more context in the missing license #5731.
3. Log each error type only once. While only logging an error once can create confusion because you might fix the issue, still see an error until you realize that it's the stack trace that is different! I would argue that it's still better to only log once. React has a bit trained the developers about this behavior. And more importantly, in our case, since all the variables are global, they shouldn't be cases where solving the error once, doesn't solve all the other console log. Solved in [license] Only log an error type once #5730.
6. Reporting wrong plan use [license] Confusing out of scope license error message #5246
The text was updated successfully, but these errors were encountered: