Skip to content
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

chroe(geo): better error handling when missing location service resources #8899

Merged
merged 4 commits into from
Sep 14, 2021

Conversation

TreTuna
Copy link
Contributor

@TreTuna TreTuna commented Sep 14, 2021

Description of changes

Adds better error handling to tell developers what's happening and what to do to solve the issue

Description of how you validated changes

Unit tests

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +259 to +263
logger.debug('Set credentials for storage. Credentials are:', cred);
this._config.credentials = cred;
return true;
} catch (error) {
logger.warn('ensure credentials error', error);
logger.warn('Ensure credentials error. Credentials are:', error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be logging the credentials at all here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what we do with this function in other categories. It will help to debug when an error is happening due to different circumstances (undefined, malformed, etc)

@codecov-commenter
Copy link

Codecov Report

Merging #8899 (c9e6c84) into geo/staging (79bd2ae) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           geo/staging    #8899      +/-   ##
===============================================
+ Coverage        78.00%   78.04%   +0.04%     
===============================================
  Files              246      246              
  Lines            17660    17674      +14     
  Branches          3793     3797       +4     
===============================================
+ Hits             13776    13794      +18     
+ Misses            3755     3752       -3     
+ Partials           129      128       -1     
Impacted Files Coverage Δ
...geo/src/Providers/AmazonLocationServiceProvider.ts 96.15% <100.00%> (+0.59%) ⬆️
packages/geo/src/Geo.ts 91.66% <0.00%> (+6.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79bd2ae...c9e6c84. Read the comment docs.

@TreTuna TreTuna merged commit e092c5e into geo/staging Sep 14, 2021
@TreTuna TreTuna deleted the geo/error-handling-updates branch September 14, 2021 20:12
TreTuna added a commit that referenced this pull request Sep 14, 2021
* choree(geo): better error handling when missing location service resources (#8899)

* chore(geo): update config type

* chore(geo): better error handling when missing resources

* chore(geo): add test for no search index by coordinates

* chore(geo): update error messaging to remind to `amplify push`
TreTuna added a commit that referenced this pull request Sep 23, 2021
* choree(geo): better error handling when missing location service resources (#8899)

* chore(geo): update config type

* chore(geo): better error handling when missing resources

* chore(geo): add test for no search index by coordinates

* chore(geo): update error messaging to remind to `amplify push`
TreTuna added a commit that referenced this pull request Sep 23, 2021
* choree(geo): better error handling when missing location service resources (#8899)

* chore(geo): update config type

* chore(geo): better error handling when missing resources

* chore(geo): add test for no search index by coordinates

* chore(geo): update error messaging to remind to `amplify push`
TreTuna added a commit that referenced this pull request Sep 23, 2021
* choree(geo): better error handling when missing location service resources (#8899)

* chore(geo): update config type

* chore(geo): better error handling when missing resources

* chore(geo): add test for no search index by coordinates

* chore(geo): update error messaging to remind to `amplify push`
iartemiev pushed a commit that referenced this pull request Sep 23, 2021
* choree(geo): better error handling when missing location service resources (#8899)

* chore(geo): update config type

* chore(geo): better error handling when missing resources

* chore(geo): add test for no search index by coordinates

* chore(geo): update error messaging to remind to `amplify push`
@github-actions
Copy link

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 *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants