-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[eas-cli] [ENG-7536] Stop app config error repeating #2020
[eas-cli] [ENG-7536] Stop app config error repeating #2020
Conversation
If app config error is thrown it is re-thrown with modified message instead of printing it to the as a "cryptic error" and repeating with 0% chances of success (since the config is incorrect) See: https://linear.app/expo/issue/ENG-7536/make-app-config-error-on-credentials-command-not-repeat-indefinitely
ENG-7536 Make app config error on credentials command not repeat indefinitely
Can only get out of it with CTRL+C, pressing a key just shows the error again. Bonus points for linking to something more relevant, like the app.config.js schema docs, instead of saying we thing our error is cryptic :) |
…-7536-make-app-config-error-not-repeat
Size Change: -437 B (0%) Total Size: 42.2 MB
|
Codecov Report
@@ Coverage Diff @@
## main #2020 +/- ##
==========================================
+ Coverage 53.32% 53.53% +0.22%
==========================================
Files 508 508
Lines 18530 18538 +8
Branches 3889 3891 +2
==========================================
+ Hits 9879 9923 +44
+ Misses 8632 8596 -36
Partials 19 19
|
err instanceof Error && | ||
err.message === | ||
`Specify "android.package" in ${getProjectConfigDescription( | ||
ctx.projectDir | ||
)} and run this command again.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any better way to determine if this is this specific error (not relying on a message)? 🤔 Ideally, it would be good to use an error code or sth like this.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about it, I can make a custom error class for that, probably the best option
Replaced generic error with specific message with a custom error class, which allows for not relying on a message to be exactly as expected See: https://linear.app/expo/issue/ENG-7536/make-app-config-error-on-credentials-command-not-repeat-indefinitely
/changelog-entry bug-fix Make app config error not repeat indefinitely |
…-7536-make-app-config-error-not-repeat # Conflicts: # CHANGELOG.md
…-7536-make-app-config-error-not-repeat # Conflicts: # CHANGELOG.md
Removed blank line from changelog See: https://linear.app/expo/issue/ENG-7536/make-app-config-error-on-credentials-command-not-repeat-indefinitely
✅ Thank you for adding the changelog entry! |
Why
https://linear.app/expo/issue/ENG-7536/make-app-config-error-on-credentials-command-not-repeat-indefinitely
How
If app config error is thrown it is re-thrown with modified message instead of printing it to the as a "cryptic error" and repeating with 0% chances of success (since the config is incorrect)
Test Plan
Added automated test
Tested manually:
The link from the message leads to the docs: