Impl WellKnownError::additional_data - #182
Conversation
Retrives additional data that could be returned by the receiver to help the payjoin sender amend their requer. Currently, only in `WellKnownError:VersionUnsupported` We do return this kind of additional data including the supported version the payjoin receiver allow.
|
Seems like we want to match a newly exposed WellKnownError instead since those errors are by definition well known and part of the api to handle |
|
As we already expose the parameters of the Moreover, as WellKnown error_codes(version-unsupported, original-psbt-,,,) are predefined in BiP0078, users can |
|
Matching on a magic string is an opaque api, so we can't do that, we'd have to expose a const, but I don't think we should. WellKnownError is already part of the public ResponseError api, so perhaps it should be public outside of this issue. I'd definitely not expect Vec as additional_data, since we're parsing arbitrary json blobs that can give us arbitrary data. What if we rethink all of this matching to occur within the ResponseError api and expose a or PS renaming the title of this PR to describe the problem it solves & why vs what could help us stay flexible in solutions too. |
resolves #181