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

introduce error handling function #75

Merged
merged 1 commit into from
Sep 18, 2019
Merged

introduce error handling function #75

merged 1 commit into from
Sep 18, 2019

Conversation

muharem
Copy link
Contributor

@muharem muharem commented Sep 9, 2019

Currently there is not way to handle errors in case if sqs is not reachable.
In case of an error the lib writes log and write error to sqsErr subscriber field. That field is not useful for clients, since we can not read and reset it safely.
To provide an error handling for clients we introduce onErrorFunc which will be called if an error occurs.

@jsafoodpanda
Copy link
Contributor

It seems extremely limited. Do you have an example of a practical use case?

@muharem
Copy link
Contributor Author

muharem commented Sep 12, 2019

It seems extremely limited. Do you have an example of a practical use case?

@jsafoodpanda
I suggesting this one instead of this #71
And in my opinion this more flexible way. Ideally the lib should not log errors and should return an error, since in this case its concurrent code we provide a way to inject a handler for an error.

@wilsont
Copy link

wilsont commented Sep 12, 2019

yes, inject a handler gives us more flexibility 👍

@muharem muharem merged commit fc00051 into master Sep 18, 2019
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.

None yet

3 participants