You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change so we only retry on 404s if a retry is desired (#1194) (#1206)
* change so we only retry on 404s if a retry is desired
* moved the retryable codes to the mirrorNodeClient.ts and make it a configurable list with default being only 404
* refactored const name so is more descriptive to mirrorNodeRetryErrorCodes
---------
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: ebadiere <[email protected]>
Co-authored-by: Alfredo Gutierrez <[email protected]>
|`CLIENT_TRANSPORT_SECURITY`| "false" | Flag to enable or disable TLS for both networks. |
47
47
|`CONSENSUS_MAX_EXECUTION_TIME`| "15000" | Maximum time in ms the SDK will wait when submitting a transaction/query before throwing a TIMEOUT error. |
48
48
|`DEFAULT_RATE_LIMIT`| "200" | default fallback rate limit, if no other is configured. |
@@ -57,6 +57,7 @@ Unless you need to set a non-default value, it is recommended to only populate o
57
57
|`LIMIT_DURATION`| "60000" | The maximum duration in ms applied to IP-method based rate limits. |
58
58
|`MIRROR_NODE_LIMIT_PARAM`| "100" | The mirror node custom limit value to be set on GET requests. This optimizes the flow to reduce the number of calls made to the mirror node by setting a limit larger than it's default limit. |
59
59
|`MIRROR_NODE_RETRIES`| "3" | The maximum number of retries on a GET request to the mirror node when an acceptable error code is returned. |
60
+
|`MIRROR_NODE_RETRY_CODES`| "[404]" | The acceptable error codes to retry on a request to the mirror node. If more than 1 error is defined value should be like ie: [400,404,500]|
60
61
|`MIRROR_NODE_RETRY_DELAY`| "250" | The delay in ms between retry requests. |
61
62
|`MIRROR_NODE_RETRIES_DEVMODE`| "5" | The maximum number of retries on a GET request to the mirror node when an acceptable error code is returned in dev mode. |
62
63
|`MIRROR_NODE_RETRY_DELAY_DEVMODE`| "200" | The delay in ms between retry requests in dev mode. |
constmirrorNodeRetryErrorCodes: Array<number>=process.env.MIRROR_NODE_RETRY_CODES ? JSON.parse(process.env.MIRROR_NODE_RETRY_CODES) : [404];// by default we should only retry on 404 errors
150
151
151
152
constaxiosClient: AxiosInstance=Axios.create({
152
153
baseURL: baseUrl,
@@ -184,7 +185,7 @@ export class MirrorNodeClient {
0 commit comments