Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providers with auto_return allow a where clause #41

Open
tkmcmaster opened this issue Jan 27, 2021 · 0 comments
Open

Providers with auto_return allow a where clause #41

tkmcmaster opened this issue Jan 27, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@tkmcmaster
Copy link
Contributor

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.

@tkmcmaster tkmcmaster added the enhancement New feature or request label Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant