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

/queries:run write errors yield a more informative error code and message #541

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dwinston
Copy link
Collaborator

Description

Invalid /queries:run calls (that is, calls with semantically invalid mongodb commands) return a 422 error with info, rather than the more generic 418.

Closes #523

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • test_queries_run_invalid_update (status: draft that needs work)

Configuration Details: none

Checklist:

  • My code follows the style guidelines of this project (have you run black nmdc_runtime/?)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (in docs/ and in https://github.com/microbiomedata/NMDC_documentation/?)
  • I have added tests that prove my fix is effective or that my feature works, incl. considering downstream usage (e.g. https://github.com/microbiomedata/notebook_hackathons) if applicable.
  • New and existing unit and functional tests pass locally with my changes (make up-test && make test-run)

frame test for new expected behavior
@dwinston dwinston changed the title fix: actual errors yield a more informative error code /queries:run write errors yield a more informative error code and message May 30, 2024
@dwinston dwinston changed the title /queries:run write errors yield a more informative error code and message /queries:run write errors yield a more informative error code and message May 30, 2024
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.

Allow user to perform $unset operations via /queries:run endpoint
1 participant