Skip to content

Conversation

chlins
Copy link
Member

@chlins chlins commented Aug 21, 2025

This pull request makes minor improvements to error handling in the codebase by updating how errors are logged when certain parameters are missing or invalid. Instead of using .inspect, the code now uses .inspect_err, which ensures error messages are only logged when an error actually occurs.

Error handling improvements:

  • In dragonfly-client-backend/src/http.rs, updated two places in the HTTP backend implementation to use .inspect_err for logging when the request header is missing. [1] [2]
  • In dragonfly-client/src/dynconfig/mod.rs, changed the error logging for invalid addresses in the Dynconfig implementation to use .inspect_err.

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)

Signed-off-by: chlins <chlins.zhang@gmail.com>
@chlins chlins added the enhancement New feature or request label Aug 21, 2025
@chlins chlins enabled auto-merge (squash) August 21, 2025 09:16
Copy link
Contributor

@LunaWhispers LunaWhispers left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.58%. Comparing base (3248b9d) to head (85d64a5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/dynconfig/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1298      +/-   ##
==========================================
- Coverage   48.59%   48.58%   -0.01%     
==========================================
  Files          60       60              
  Lines       15154    15154              
==========================================
- Hits         7364     7363       -1     
- Misses       7790     7791       +1     
Files with missing lines Coverage Δ
dragonfly-client-backend/src/http.rs 98.13% <100.00%> (-0.27%) ⬇️
dragonfly-client/src/dynconfig/mod.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@chlins chlins merged commit a756f50 into main Aug 21, 2025
9 checks passed
@chlins chlins deleted the fix/inspect-err branch August 21, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants