tweedegolf / irmars

Rust library for interfacing with irma servers.
Other
4 stars 1 forks source link

SessionResult response deserialization issues #1

Closed leonbotros closed 3 years ago

leonbotros commented 3 years ago

https://github.com/tweedegolf/irmars/blob/659859d6aa2bdda636ee0672ca9011e74d3ecff1/src/sessionresult.rs#L71

This should be renamed using #[serde(rename = "id")].

Other than that, it might be nicer to wrap the whole "disclosed" field in an option.

leonbotros commented 3 years ago

As side-effect, retrieving the result from a session that has completed succesfully will result in a NetworkError instead of a SessionResult (because deserialization fails).

leonbotros commented 3 years ago

Regarding making the "disclosed" field optional: Polling a session for a result that has not yet finished will (I think) also fail in a NetworkError because the field "disclosed" cannot be found.

leonbotros commented 3 years ago

Also, renaming NetworkError to something like ReqwestError would make more sense.

leonbotros commented 3 years ago

Closed by accident

davidv1992 commented 3 years ago

Issue is fixed in master, will be released as part of 0.2.0