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

Error processing logic. #18

Open
whynowy opened this issue Feb 22, 2023 · 0 comments
Open

Error processing logic. #18

whynowy opened this issue Feb 22, 2023 · 0 comments

Comments

@whynowy
Copy link
Member

whynowy commented Feb 22, 2023

		if retryError != nil {
			hs.logger.Errorf("HTTP Request failed. Error : %v", retryError)
			if hs.dropIfError {
				hs.logger.Warn("Dropping messages due to failure")
				return ok
                                 // -- Should it be appended to ok list instead of returning?
			}
			failed = failed.Append(sinksdk.ResponseFailure(datum.ID(), "failed to forward message"))
                         // -- This means the ID is added to "failed", as well as "ok" in the next next line.
		}
		ok = ok.Append(sinksdk.ResponseOK(datum.ID()))

if retryError != nil {
hs.logger.Errorf("HTTP Request failed. Error : %v", retryError)
if hs.dropIfError {
hs.logger.Warn("Dropping messages due to failure")
return ok
}
failed = failed.Append(sinksdk.ResponseFailure(datum.ID(), "failed to forward message"))
}
ok = ok.Append(sinksdk.ResponseOK(datum.ID()))

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

No branches or pull requests

1 participant