semiotic-ai / timeline-aggregation-protocol

A fast, efficient and trust-minimized unidirectional micro-payments system.
Apache License 2.0
14 stars 3 forks source link

Update TAP manager to directly return errors from adapters #113

Closed ColePBryan closed 1 year ago

ColePBryan commented 1 year ago

In current implementation any error returned by one of the user defined adapters (with user defined errors) are converted to string and attached to a ambiguous adapter_error variant of the core error enum. This doesn't allow the user to easily distinguish what error occurred. Instead, the error needs to be returned in a way that the original error can be matched.

Issue: User defined errors in trait are just being converted to string in tap manager and returned using an ambiguous error type (adapter_error). desired behavior: User defined error type is maintained and returned in a way that the user can use it as needed.