-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Is your feature request related to a problem? Please describe.
When errors are returned from the Senzing SDK, I'd like to know if the operation is retryable. I know there are a certain class of errors that come back from the SDK which are retryable, I just don't know what they all are.
Describe the solution you'd like
I'd like to see a simple and direct IsRetryable(err error) bool function. This would allow me to write fairly simple code, for example:
...
err := (*j.engine).AddRecord(ctx, record.DataSource, record.Id, record.Json, loadID)
if err != nil {
if IsRetryable(err) {
//requeue to retry later
} else {
//send to the dead-letter queue for later analysis by an expert
}
}
...
Describe alternatives you've considered
- I've considered sending all records that receive an error to the dead-letter queue, but that seems wasteful. If I could just requeue and try again, it would be much better. Especially if the issue were some sort of temporary connection issue.
- Another option is to parse the JSON error message myself and retrieve some sort of error code that might inform me as to if this error is retryable, but I don't know all the error codes that are considered retryable. So, the best I could do is evolve a solution over time as I see error code.
Metadata
Metadata
Assignees
Labels
No labels