Skip to content

ChaosHandler cannot be used in interactive scenarios #427

@sebastienlevert

Description

@sebastienlevert

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

Description

When using ChaosHandler, it should work in interactive scenarios (not only Unit Tests). Right now, if it fails once, it will always fail, which creates a wrong experience in testing throttling handling.

Steps to Reproduce

  1. Inject a ChaosHandler in a list of middleware
  2. If the first requests gets throttled, then it will always fail. Making testing an interactive scenario impossible

Expected behavior: [What you expected to happen]

Every new request should get randomized and potentially succeed.

Actual behavior: [What actually happened]

It's always failing if the initial random identifies the request as a 429.

Additional Context

Add any other context about the problem here..

Usage Information

SDK Version - [SDK version you are using]

  • Node (Check, if using Node version of SDK)

Node Version - 10

  • Browser (Check, if using Browser version of SDK)

Browser Name - Edge

Version - 89.0

AB#9063

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions