Skip to content

"maxRetries" DefaultRequestExecutor config behavior does not work as expected when set to "0" #458

@krzysztof-grzybek

Description

@krzysztof-grzybek

Describe the bug

When "maxRetries" is set to "0", sdk should retry indefinitely in case of rate limit API error. Instead, it doesn't retry at all. The docs clearly specifiy the expected behavior:

maxRetries - The number of times to retry, defaults to 2. Set to 0 if you do not want to limit the number of retries.

The problem was introduced in this PR:

#354 (src/default-request-executor.js)

cc: @denysoblohin-okta

Reproduction Steps?

Use DefaultRequestExecutor with "maxRetries" to "0". In case of Rate Limit API error, an error is thrown instead of request retry.

SDK Versions

latest

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions