Open
Conversation
Collaborator
Pull Request Test Coverage Report for Build 23742597279Details
💛 - Coveralls |
benalleng
requested changes
Mar 23, 2026
Collaborator
benalleng
left a comment
There was a problem hiding this comment.
I would really prefer we not use ..Issue as the naming convention in the case of preventing Dart Exception classes, lets use PayloadFailure, RequestFailure, SessionFailure instead
Collaborator
Author
I see, just merged a PR in uniffi-dart upstream to fix the Dart failures, should help with future error name issues, and can use the better names. I'm thinking of renaming it back to the original |
Add stable kind accessors for receiver protocol, payload,\nrequest, and session errors in the core crate and surface\nmatching snapshot objects over UniFFI.\n\nBindings could previously only tell that a receiver protocol\nerror happened, not whether the failure came from the original\npayload, the v1 HTTP request, or the v2 session machinery.\nThat made cross-language integrations parse display strings or\ntreat actionable failures as opaque.\n\nThe new accessors preserve the existing display behavior while\nmaking the branchable error shape available to Rust and FFI\ncallers. Focused tests cover the core accessors and the FFI\nmapping for payload and request failures.
Point the Dart generator dependency at the merged upstream fix\nfor object types ending in Error.\n\nThis replaces the temporary downstream workaround path with the\nupstream uniffi-dart revision that contains the naming fix, so the\nreceiver bindings can keep their original Error names.
Refresh the minimal and recent lockfiles after upgrading\nuniffi-dart to the upstream revision with the Dart naming fix.\n\nThis keeps the branch's resolved dependency graph aligned with the\nCargo.toml change used by CI and local testing.
71f2fda to
452c379
Compare
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.
Closes #1270.
This PR exposes the receiver protocol error structure that already existed in core but was being flattened at the FFI boundary. Before this change, bindings could tell that a receiver protocol error happened, but they could not reliably distinguish malformed original payloads, malformed v1 requests, and v2 session failures, or inspect the details that matter for control flow.
The change adds stable classifications for protocol, payload, request, and session errors, along with targeted detail accessors for the fields that are operationally useful now, such as supported versions, header name, invalid content type, and expected versus actual content length. The FFI continues to use stable object wrappers rather than freezing every internal Rust enum variant directly into the cross-language API.
The result is that bindings can now branch on receiver failures in a structured way instead of scraping display strings. That gives downstream integrations a usable receiver-side error contract and sets the pattern for the remaining receiver error work.