Skip to content

Include expected request match count in error messages #3

Description

@reagent

When using the once() modifier, the matching behaves as expected, but it's not clear from the error message why it's failing:

Rejected to value: [Error: No match found for request:
{
  "baseURL": "https://host.example",
  "url": "/path",
  "method": "get",
  "headers": {
    "Accept": "application/json, text/plain, */*"
  }
}·
Available request matchers:
[
  {
    "method": "get",
    "uri": "https://host.example/path",
    "headers": {
      "Accept": "application/json, text/plain, */*"
    }
  }
]]

The above appears as though it should succeed, but it's because the matches were exhausted that it failed. This should be made clearer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions