Skip to content

Do not log ERROR on directory validation errors#628

Merged
arminsabouri merged 1 commit intopayjoin:masterfrom
arminsabouri:directory-error-logs
Apr 9, 2025
Merged

Do not log ERROR on directory validation errors#628
arminsabouri merged 1 commit intopayjoin:masterfrom
arminsabouri:directory-error-logs

Conversation

@arminsabouri
Copy link
Collaborator

Application validation errors generally shouldn't get log'd as an ERROR. The ERROR catagory should be reserved for internal server failures.

Issue: #627

Application validation errors generally shouldn't get log'd as an `ERROR`.
The `ERROR` catagory should be reserved for internal server failures.

Issue: payjoin#627
@arminsabouri arminsabouri requested a review from spacebear21 April 2, 2025 18:04
const OHTTP_KEY_REJECTION_RES_JSON: &str = r#"{"type":"https://iana.org/assignments/http-problem-types#ohttp-key", "title": "key identifier unknown"}"#;

error!("Bad request: Key configuration rejected: {}", e);
warn!("Bad request: Key configuration rejected: {}", e);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should this be ERROR ? Need to dig a bit further to understand when this error would occur

Copy link
Collaborator

@spacebear21 spacebear21 Apr 2, 2025

Choose a reason for hiding this comment

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

This would occur if a client is using the wrong ohttp keys, e.g. #615

This shouldn't happen so much since #614 is now deployed.

I think it should WARN

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

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

ACK 1477c9e

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 14226428979

Details

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 81.577%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin-directory/src/lib.rs 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
payjoin/src/send/mod.rs 2 94.46%
Totals Coverage Status
Change from base Build 14222664788: -0.03%
Covered Lines: 5256
Relevant Lines: 6443

💛 - Coveralls

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

utack 1477c9e

@arminsabouri arminsabouri merged commit 2851a71 into payjoin:master Apr 9, 2025
7 checks passed
@arminsabouri arminsabouri deleted the directory-error-logs branch April 9, 2025 20:08
@DanGould DanGould mentioned this pull request Apr 14, 2025
13 tasks
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.

4 participants