Repository navigation
ref(types): Hide jsonwebtoken and mediatype error types - #745
Merged
Merged
Conversation
Semver Impact of This PRThis PR lands in these workspaces:
📋 Changelog PreviewThis is how your changes will appear in the changelog. Other Changes
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #745 +/- ##
=======================================
Coverage 91.54% 91.55%
=======================================
Files 116 116
Lines 22088 22090 +2
=======================================
+ Hits 20221 20224 +3
+ Misses 1867 1866 -1
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jan-auer
force-pushed
the
ref/hide-dep-errors
branch
from
October 30, 2026 10:37
99be7fe to
b7a990e
Compare
lcian
approved these changes
Oct 30, 2026
Member
Author
|
Marking this as not breaking this one time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The published crates expose error types from two dependencies. Because of this, a major upgrade of these dependencies is a breaking change for our users. #744 keeps them on their current versions for this reason.
This PR makes the breaking change once, so that later upgrades are not breaking:
objectstore_client::Error::TokenErrornow containsobjectstore_client::TokenErrorinstead ofjsonwebtoken::errors::Error.objectstore_types::metadata::Error::ContentTypenow containsobjectstore_types::metadata::InvalidContentTypeinstead ofmediatype::MediaTypeError.The new types are opaque. They show the message of the underlying error, so errors are as descriptive as before. The public API no longer has
Fromconversions from the dependency error types.The token error message now also gives context, for example
failed to create auth token: InvalidKeyFormatinstead of onlyInvalidKeyFormat.Changelog Entry
Error::TokenErrorandmetadata::Error::ContentTypenow wrap opaque error types instead of thejsonwebtokenandmediatypeerror types._needs no change. Code that inspects the inner error can use its message instead.