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

feat(sample logging middleware) #146

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

lkhari
Copy link
Contributor

@lkhari lkhari commented Jan 27, 2020

What did you implement:

I allowed users to have the choice if their uncaught errors are to be logged. This allows people to send validation errors to appsync or step functions without being logged out as errors.
#145

How did you implement it:

I added an enviroment variable ( POWERTOOLS_IGNORE_ERRORS ) following a proposed standard from #53. to give people the choice if they want there uncaught errors to be logged.

How can we verify it:

Have a lambda function return an error wrapped with sample logging middleware. Ensure that when enviroment variable POWERTOOLS_IGNORE_ERRORS = true then it doesn't log errors sent back. Also when POWERTOOLS_IGNORE_ERRORS is anything else that it logs the errors.

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / projects / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: Yes
Is it a breaking change?: NO

Copy link
Contributor

@theburningmonk theburningmonk left a comment

Choose a reason for hiding this comment

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

since we use semantic-release we need the commit messages to follow conventional commit

@lkhari lkhari force-pushed the prevent-errors-being-logged branch from 662f8fe to 89ce3ed Compare January 30, 2020 09:46
Copy link
Contributor

@theburningmonk theburningmonk left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants