Skip to content

Providers with auto_return allow a where clause #41

@tkmcmaster

Description

@tkmcmaster

Describe the bug

Currently with auto_return you can have block, force, and if_not_full. But there's no way to turn it off if there is an error. We have many cases where we have to put a provides that just puts it back in only in certain conditions. It would be nice to have an option auto_return: where that then could provide a where clause like where: response.status < 300 (on success) or where: response.body=success.

Expected behavior

We can conditionally decide whether to auto_return.

Config file

providers:
  session:
    response:
      auto_return: where
      where: response.status < 300

Additional context

This also may alleviate some of the bugs around try runs with providers that are loopbacks to the same API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions