-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Go Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Context
The executeWithRetries func in the examples for how to handle "SystemOverloadError" labels currently returns any, error. However, it's significantly more ergonomic to return T, error to preserve type information.
E.g.
func executeWithRetries[T any]( ctx context.Context, maxAttempts int, fn func(ctx context.Context) (T, error), ) (T, error) {
Definition of done
- Update the "executeWithRetries" func to use a generic type param for the return type.
Pitfalls
- related to
-
GODRIVER-3849 Provide updated code examples for non-backpressure drivers handling backpressure errors
-
- Closed
-