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
Distinguish between retrialable and non-retriable errors when publishing messages with pubsub #5136
Comments
Maybe this should be |
@artursouza I want to make sure I understand correctly that for retriable errors we don't need to log Error, but just log Warn or log Debug, while for non-retriable errors we need to log Error. |
I think it should log warning since users have asked for this behavior before. |
Correct. It probably means that the function should return two error objects, one for retriable error and one for non-retriable. |
/assign |
@artursouza The act of catching these errors and logging them happens in the pubsub component(e.g. rabbitmq) of the components-contrib repo, right? |
Not necessarily. This code is handled here: Line 761 in 490ef74
I think we can move the log logic there as well and we will have two error objects to differentiate between non-retriable and retriable errors. The change on each component to understand the difference can be a follow up. |
In what area(s)?
What version of Dapr?
1.8.x
Expected Behavior
Should log WARN instead.
Actual Behavior
Logs ERROR because it returns an error to the upstream call stack:
dapr/pkg/runtime/runtime.go
Line 1937 in 490ef74
dapr/pkg/runtime/runtime.go
Line 1945 in 490ef74
dapr/pkg/runtime/runtime.go
Line 1960 in 490ef74
Code should handle retriable vs non-retriable error as different return objects
Steps to Reproduce the Problem
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: