Skip to content
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

exposing Rosetta types.Error in fetcher #98

Merged
merged 12 commits into from
Aug 13, 2020
Merged

exposing Rosetta types.Error in fetcher #98

merged 12 commits into from
Aug 13, 2020

Conversation

cindyxkuang
Copy link
Contributor

Fixes # .

Motivation

In order to allow consumers of the fetcher to parse errors upstream, we need to expose the Rosetta types.Errors being returned from our API calls.

Solution

Defined an ErrorRes struct that wraps both the Go error and Rosetta error being returned from API calls, and returning that from the fetcher instead.

Open questions

@patrick-ogrady
Copy link
Contributor

patrick-ogrady commented Aug 13, 2020

This is GREAT work @cindyxkuang! Looking forward to seeing this applied to the other endpointsin fetcher.

@patrick-ogrady
Copy link
Contributor

Can we return a *fetcher.Error in the *Retry methods too?

Copy link
Contributor

@qiwu7 qiwu7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 LGTM

qiwu7
qiwu7 previously approved these changes Aug 13, 2020
signing

signing plus small edit

renaming res to fetcherErr
@qiwu7 qiwu7 merged commit b41dd6d into coinbase:master Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants