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

feat: additional query (_q) to return 400 in case fields not included in the schema #127

Merged
merged 11 commits into from
Sep 11, 2023

Conversation

ThisIsDemetrio
Copy link
Collaborator

Pull Request Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Description

Every method requesting to parse the content of the _q query parameter now returns a 400 Bad Request in case there's at least one field not included in the JSON Schema of the collection (before the exception was not handled, and a 500 was returned).

Closes #55 .

PR Checklist

  • The commit message follows our guidelines included in the CONTRIBUTING.md
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR introduce a breaking change?

  • Yes
  • No

We consider this as a breaking change because of the different HTTP response status code.

Other information

@danibix95 danibix95 added enhancement New feature or request breaking For changes that might break service behavior next_major labels Jul 17, 2023
@danibix95 danibix95 removed the request for review from hiimjako September 11, 2023 10:27
@danibix95 danibix95 force-pushed the edit/invalid-mongo-query-to-return-400 branch from 1b78f26 to bfcaa73 Compare September 11, 2023 11:02
@danibix95 danibix95 merged commit 4a128ab into main Sep 11, 2023
@danibix95 danibix95 deleted the edit/invalid-mongo-query-to-return-400 branch September 11, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking For changes that might break service behavior enhancement New feature or request next_major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GET /count with error in _q returns 500 instead of 400
2 participants