Skip to content

fix: task failure caused by 404#3038

Merged
abeizn merged 1 commit intoapache:mainfrom
merico-ai:ignore-and-continue
Sep 9, 2022
Merged

fix: task failure caused by 404#3038
abeizn merged 1 commit intoapache:mainfrom
merico-ai:ignore-and-continue

Conversation

@mindlesscloud
Copy link
Contributor

Summary

fix #2960 [Bug][gitihub] collect account failed by not found user
In the case of err == ErrIgnoreAndContinue, the err should not be wrapped, because on the caller side, the expression err == ErrIgnoreAndContinue would evaluate as false.

if apiClient.afterResponse != nil {
		err = apiClient.afterResponse(res)
		if err != nil && err != ErrIgnoreAndContinue {
			res.Body.Close()
			return nil, errors.Default.Wrap(err, fmt.Sprintf("error running afterRequest for %s", req.URL.String()), errors.UserMessage("error after making API call"))
		}
	}

Does this close any open issues?

Closes #2960

Screenshots

Include any relevant screenshots here.

Other Information

Any other information that is important to this PR.

Copy link
Contributor

@abeizn abeizn left a comment

Choose a reason for hiding this comment

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

LGTM

@abeizn abeizn merged commit 9dc48f9 into apache:main Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][gitihub] collect account failed by not found user

2 participants