Skip to content

Return retrieval stats even after failure #33

@elijaharita

Description

@elijaharita

If a retrieval starts and then fails, we still want to know how long we spent, how much FIL we paid, how much was received, etc. Right now, we just return an error that says uh oh something went wrong!

We will probably want to rename RetrievalStats to RetrievalResult, and if a retrieval fails partway through, instead of returning a non-nil error, we will fill out the RetrievalResult and include an Outcome value or Err error inside of the struct.

Planned like this because returning valid data along with a non-nil error in the return tuple is weird and unexpected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions