Skip to content

change transactions clients method signatures to match use, allow result of None to return 204 #387

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

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

philvarner
Copy link
Collaborator

@philvarner philvarner commented Mar 25, 2022

Related Issue(s):

Description:

  • for all Txn clients, update the method return types to match what can actually be returned. This is now None, a STAC object type, or a starlette Response.
  • In addition to the existing behavior of returning a 200 + STAC object type or Response, also return a 204 No Content if the result value is None.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@philvarner philvarner force-pushed the pv/refactor-clients branch from d7b1362 to de69499 Compare March 28, 2022 12:43
@philvarner philvarner marked this pull request as ready for review March 28, 2022 12:48
@moradology
Copy link
Collaborator

Discussed this with @geospatial-jeff. On the one hand, it is generally the case that exceptions are used to inject non-200 responses. At the same time, we agreed it felt bizarre to force exceptions in non-exceptional cases. +1

@moradology moradology merged commit 77b368f into stac-utils:master Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants