-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add RequestVcErrorDetail enum #2836
Add RequestVcErrorDetail enum #2836
Conversation
@@ -102,10 +103,33 @@ pub struct RequestVCResult { | |||
pub pre_id_graph_hash: H256, | |||
} | |||
|
|||
#[derive(Debug, Encode, Decode, Clone)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to incorporate the causing errors in the variants below, but ran into two issues:
- the respective (mostly 3rd party) error types don't implement the needed traits for
derive
to work here, and - clippy complained that the type was "too big" for an
Err
variant, hence theBox
in theAssertionBuildFailed
variant :sadpanda:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
is there any alignment with client-sdk?
We discussed it earlier with @jonalvarezz (although this PR goes for a smaller change in the end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good to me!
are ts-tests updates coming in a follow-up pull requests? it needs update here, for instance
#[derive(Debug, Encode, Decode, Clone)] | ||
pub struct RequestVcResultOrError { | ||
pub payload: Vec<u8>, | ||
pub is_error: bool, | ||
pub result: Result<Vec<u8>, RequestVcErrorDetail>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! props for using the Result
type
😄 i think it is – the value of the non-existent field is falsy, the condition doesn't meet |
💀 |
@@ -14,6 +14,7 @@ | |||
"ts-node": { | |||
"esm": true, | |||
"experimentalResolver": true, | |||
"experimentalSpecifierResolution": "node" | |||
"experimentalSpecifierResolution": "node", | |||
"transpileOnly": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this to mitigate the error:NULL
messages from mocha; see this issue /cc @jonalvarezz @0xverin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally via https://github.com/litentry/client-sdk/pull/35's update.
looking good. thanks, Ariel!
Context
Partially implements P-609
Further refactoring of the API is needed, but deferred for now for timing constraints.
TODO