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

misc: Downgrade clock skew exception stack trace to debug level #1143

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

lauzadis
Copy link
Contributor

Issue #

Description of changes

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

@lauzadis lauzadis added the no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly. label Aug 23, 2024
@lauzadis lauzadis requested a review from a team as a code owner August 23, 2024 20:34

This comment has been minimized.

1 similar comment

This comment has been minimized.

Copy link
Contributor

@ianbotsf ianbotsf left a comment

Choose a reason for hiding this comment

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

Minor nit—fix and ship!

@@ -89,7 +89,8 @@ public class ClockSkewInterceptor : HttpInterceptor {
try {
Instant.fromRfc5322(it)
} catch (e: ParseException) {
logger.warn(e) { "Service returned malformed \"Date\" header value \"$it\", skipping skew calculation" }
logger.warn { "Service returned malformed \"Date\" header value \"$it\", skipping skew calculation" }
logger.debug(e) { e.message.toString() }
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Logging e.message is unnecessary since the logger should already include it. I'd just give a bit more context about where the error was encountered and leave it at that:

logger.debug(e) { "Error while parsing \"Date\" header from service response" }
logger.warn { "Service returned malformed \"Date\" header value \"$it\", skipping skew calculation" }

Copy link

Affected Artifacts

Changed in size
Artifact Pull Request (bytes) Latest Release (bytes) Delta (bytes) Delta (percentage)
aws-protocol-core-jvm.jar 20,267 20,194 73 0.36%

@lauzadis lauzadis merged commit cdfd9a6 into main Aug 26, 2024
15 checks passed
@lauzadis lauzadis deleted the misc-clock-skew-warn branch August 26, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants