-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Is your feature request related to a problem? Please describe.
Getting error like:
{"name":"Error","message":"13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: read ECONNRESET","stack":"at Object.callErrorFromStatus (/usr/local/autotrader/app/node_modules/@grpc/grpc-js/build/src/call.js:31:26)"}
I want to be able to retry such error, but not all INTERNAL errors.
Describe the solution you'd like
Allow to specify custom shouldRetryFn function that could return True if error message contains certain phrase.
this function would be part of RetryOptions that you can pass as override to createApiCall
Describe alternatives you've considered
- It is currently possible to retry all errors with INTERNAL code.
- Other solution would be adding separate error code for connection errors to grpc library, which could break existing solutions for others relying on INTERNAL code.
- In streaming calls it is already possible to specify similar shouldRetryFn function. Normal calls should also have such option.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.