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

Include inner error message in Display for SerdeError #1481

Merged
merged 1 commit into from
May 1, 2024

Conversation

XAMPPRocky
Copy link
Contributor

Motivation

Currently the error message for deserialisation error is opaque not saying why it failed. This is particularly annoying when you're watching CRDs as if you're testing a new version, and there is something in a new CRD that is breaking your current service, you don't see what caused that breakage

Solution

Just include the inner error message in the display impl.

Signed-off-by: Erin Power <xampprocky@gmail.com>
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

LGTM. Note that for these cases you can in general get this information out of an error formatter that walks the chain like miette.

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.6%. Comparing base (72eef44) to head (1990d6c).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1481   +/-   ##
=====================================
  Coverage   74.6%   74.6%           
=====================================
  Files         79      79           
  Lines       6871    6871           
=====================================
  Hits        5125    5125           
  Misses      1746    1746           

@clux clux added this to the 0.91.0 milestone May 1, 2024
@clux clux added the changelog-fix changelog fix category for prs label May 1, 2024
@clux clux merged commit 9eb5048 into kube-rs:main May 1, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-fix changelog fix category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants