Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Implement function for creating errors with binary details field#191

Open
GeorgeHahn wants to merge 2 commits into
tower-rs:masterfrom
GeorgeHahn:feature/add-details-status-constructor
Open

Implement function for creating errors with binary details field#191
GeorgeHahn wants to merge 2 commits into
tower-rs:masterfrom
GeorgeHahn:feature/add-details-status-constructor

Conversation

@GeorgeHahn

Copy link
Copy Markdown
Contributor

This PR adds a function to create Status errors with the details field set.

This is not a complete solution - other libraries offer ways to encode a protobuf into this field. This change will allow for some experimentation and manual implementation for error details.

Related: #136

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So, is the thinking to just accept raw bytes, and have the user determine what to serialize into them?

@GeorgeHahn

Copy link
Copy Markdown
Contributor Author

Correct; my hope was to at least make details user accessible.

I just pushed a commit that adds the ability to populate details with an encoded protobuf. This is far more useful and may eliminate any desire for with_raw_details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants