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

fix(session_token): log error only when it occurs #1136

Merged
merged 8 commits into from
May 22, 2023

Conversation

Abhicodes-crypto
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

let error = parsed_payment_method_result.as_ref().err();
logger::error!(session_token_parsing_error=?error);
parsed_payment_method_result.ok()

This logic logs the error always. Changed it to log error only when error occurs.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Compiles. But please verify the logic while review.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@Abhicodes-crypto Abhicodes-crypto added A-core Area: Core flows C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 11, 2023
@Abhicodes-crypto Abhicodes-crypto self-assigned this May 11, 2023
@Abhicodes-crypto Abhicodes-crypto requested review from a team as code owners May 11, 2023 18:06
@jarnura jarnura added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 12, 2023
Narayanbhat166
Narayanbhat166 previously approved these changes May 18, 2023
@Narayanbhat166 Narayanbhat166 added S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels May 18, 2023
Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

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

Other than that, looks good to me!

crates/common_utils/src/ext_traits.rs Outdated Show resolved Hide resolved
@SanchithHegde SanchithHegde added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-needs-conflict-resolution Status: This PR needs conflicts to be resolved by the author labels May 20, 2023
SanchithHegde
SanchithHegde previously approved these changes May 22, 2023
@Narayanbhat166 Narayanbhat166 added this pull request to the merge queue May 22, 2023
Merged via the queue into main with commit ebf3de4 May 22, 2023
@SanchithHegde SanchithHegde deleted the fix-session-err-log branch May 22, 2023 18:50
@SanchithHegde SanchithHegde removed the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants