-
Notifications
You must be signed in to change notification settings - Fork 816
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
chore: remove unnecessary stack trace log when adding services #4610
chore: remove unnecessary stack trace log when adding services #4610
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4610 +/- ##
==========================================
- Coverage 61.57% 61.55% -0.03%
==========================================
Files 333 333
Lines 14550 14558 +8
Branches 2764 2932 +168
==========================================
+ Hits 8959 8961 +2
+ Misses 5164 5152 -12
- Partials 427 445 +18
Continue to review full report at Codecov.
|
@@ -20,7 +20,7 @@ module.exports = { | |||
context.print.success(`Successfully updated resource ${resourceName} locally`); | |||
}) | |||
.catch(err => { | |||
context.print.info(err.stack); | |||
context.print.error(err.message); |
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.
This is going to swallow errors on update there is a possibility of users losing information of their errors on update of a valid project
); | ||
print.info(''); | ||
}) | ||
.catch(err => { | ||
context.print.info(err.stack); | ||
context.print.error(err.message); |
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.
Same here, we still need the stack trace in case of other errors.
@sebastiancrossa If the project is not an amplify project any other command that does not initialize, configure or pull an existing project should result in an error/information without a stack trace. Refer to docs for more information. |
…ices (aws-amplify#4610)" This reverts commit 5bee574. Revert "feat: add check for extra command line args provided with amplify delete (aws-amplify#4576)" This reverts commit 82d1093. test(amplify-category-auth): fixed push test
…ices (aws-amplify#4610)" This reverts commit 5bee574.
* feat(amplify-provider-awscloudformation): add region ca-central-1 * fix test * Revert "Add region ca-central-1 (#4796)" This reverts commit c8b6bd8. * Revert "feat: add check for extra command line args provided with amplify delete (#4576)" This reverts commit 82d1093. * Revert "perf: fulfill promises to upload files to S3 concurrently (#4575)" This reverts commit 96d1914. * Revert "fix(cli): remove unnecessary stack trace log when adding services (#4610)" This reverts commit 5bee574. * Revert "fix test" This reverts commit 63c3c78. Co-authored-by: UnleashedMind <zhoweimi@186590ce137f.ant.amazon.com>
* feat(amplify-provider-awscloudformation): add region ca-central-1 * fix test * Revert "Add region ca-central-1 (aws-amplify#4796)" This reverts commit af29f35. * Revert "feat: add check for extra command line args provided with amplify delete (aws-amplify#4576)" This reverts commit 48b27b7. * Revert "perf: fulfill promises to upload files to S3 concurrently (aws-amplify#4575)" This reverts commit 9fbee8a. * Revert "fix(cli): remove unnecessary stack trace log when adding services (aws-amplify#4610)" This reverts commit 56efb32. * Revert "fix test" This reverts commit 50a8073fbbdb56931191912938fb50f542197832. Co-authored-by: UnleashedMind <zhoweimi@186590ce137f.ant.amazon.com>
* feat(amplify-provider-awscloudformation): add region ca-central-1 * fix test * Revert "Add region ca-central-1 (aws-amplify#4796)" This reverts commit af29f35. * Revert "feat: add check for extra command line args provided with amplify delete (aws-amplify#4576)" This reverts commit 48b27b7. * Revert "perf: fulfill promises to upload files to S3 concurrently (aws-amplify#4575)" This reverts commit 9fbee8a. * Revert "fix(cli): remove unnecessary stack trace log when adding services (aws-amplify#4610)" This reverts commit 56efb32. * Revert "fix test" This reverts commit 50a8073fbbdb56931191912938fb50f542197832. Co-authored-by: UnleashedMind <zhoweimi@186590ce137f.ant.amazon.com>
* feat(amplify-provider-awscloudformation): add region ca-central-1 * fix test * Revert "Add region ca-central-1 (aws-amplify#4796)" This reverts commit af29f35. * Revert "feat: add check for extra command line args provided with amplify delete (aws-amplify#4576)" This reverts commit 48b27b7. * Revert "perf: fulfill promises to upload files to S3 concurrently (aws-amplify#4575)" This reverts commit 9fbee8a. * Revert "fix(cli): remove unnecessary stack trace log when adding services (aws-amplify#4610)" This reverts commit 56efb32. * Revert "fix test" This reverts commit 50a8073fbbdb56931191912938fb50f542197832. Co-authored-by: UnleashedMind <zhoweimi@186590ce137f.ant.amazon.com>
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Issue #, if available:
#4283
Description of changes:
The unnecessary stack traces that were displayed through the console when a user tried to run amplify add without initializing amplify first was because of a lacking try/catch block which displays only the error message, so I added that onto the parts where the addition of services was being called.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.