Skip to content

Handle empty query parameters attempts: Attempted to fix query parameter handling, see #2.#4

Open
Adebowale-Morakinyo wants to merge 4 commits into
mainfrom
handle-empty-query-parameters-attempts
Open

Handle empty query parameters attempts: Attempted to fix query parameter handling, see #2.#4
Adebowale-Morakinyo wants to merge 4 commits into
mainfrom
handle-empty-query-parameters-attempts

Conversation

@Adebowale-Morakinyo

Copy link
Copy Markdown
Owner

This pull request contains attempts made to resolve issue #2.

Problem: The issue was related to handling empty query parameters in the NoteList endpoint, which caused a "Not a valid integer" error.

Attempts: In this branch, we made several attempts to address the issue. These attempts include:

  • Modifying the NoteListQuerySchema to use default values when query parameters are missing.
  • Adjusting the NoteList endpoint to handle empty query parameters and provide meaningful default values.
  • Implementing validation logic to catch and handle empty query parameters.

Testing: We conducted tests for each attempt to determine their effectiveness in resolving the issue. However, none of these attempts provided a complete solution.

Related Changes:

  • Updated the NoteListQuerySchema and NoteList endpoint to test different approaches.

While these attempts did not fully resolve the issue, they are part of our process to identify the most effective solution. We have learned from these attempts and have since implemented a working solution in the "handle-empty-query-parameters" branch.

Please review these attempts for reference and historical context. However, the working solution is available in the "handle-empty-query-parameters" branch, and we recommend merging that branch to address the issue.

Thank you for your understanding.

…tQuerySchema to specify the missing parameter for the fields that have default values.
…tQuerySchema setting required=False to ensure that missing query parameters won't result in validation errors, allowing the NoteList get method to handle them with default logic
… how the query parameters are being loaded, whether validation errors are occurring, and if the default values are being applied correctly.
…lse in the decorator should skip the validation step for the fields extracted from the query parameters, to allow handling validation manually in the endpoint, see #2
@Adebowale-Morakinyo Adebowale-Morakinyo added the bug Something isn't working label Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant