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

Improve artifact download error message #2482

Merged
merged 4 commits into from
Mar 28, 2017
Merged

Conversation

schmichael
Copy link
Member

Fixes #2289

Unfortunately took more RecoverableError hijinx than I would have liked.
There might be a better way.

Fixes #2289

Unfortunately took more RecoverableError hijinx than I would have liked.
There might be a better way.
if rerr, ok := err.(*structs.RecoverableError); ok {
return structs.NewRecoverableError(wrapped, rerr.Recoverable)
if rerr, ok := err.(structs.Recoverable); ok {
return structs.NewRecoverableError(wrapped, rerr.Recoverable())
Copy link
Contributor

Choose a reason for hiding this comment

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

return structs.NewRecoverableError(wrapped, structs.IsRecoverable(err))?

Copy link
Contributor

Choose a reason for hiding this comment

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

Everywhere this pattern is used

Copy link
Contributor

Choose a reason for hiding this comment

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

It honestly might be worth adding a helper function.

func NewWrappedRecoverableError(wrapped, original) { ... }

It just checks if the original is recoverable.

@schmichael schmichael merged commit 4d3c571 into master Mar 28, 2017
@schmichael schmichael deleted the f-2289-better-artifact-err branch March 28, 2017 19:48
schmichael added a commit that referenced this pull request Mar 28, 2017
@github-actions
Copy link

github-actions bot commented Apr 2, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants