Fix Internal Server Error When Filtering by String Column but the value can be interpreted as another type#36
Open
Antonio171003 wants to merge 4 commits intowiringbits:mainfrom
Conversation
… column whose data type is not a string.
AlexITC
requested changes
Sep 7, 2024
| response.headOption.isEmpty must be(true) | ||
| } | ||
|
|
||
| "don't fail when the column is citext or similar, but the value can be interpreted as Int." in withApiClient { |
Contributor
There was a problem hiding this comment.
When the value is CITEXT we should interpret it as string, any reason to interpret it as int?
Contributor
Author
There was a problem hiding this comment.
Before, if the value was "123", it was assumed that the value was an Int, and the same for the column type. This caused an internal server error because it compared a citext with an Int.
Same for the others comments
Contributor
There was a problem hiding this comment.
From my point of view, the input argument must be handled like the type derived from the database instead of guessing its format.
Contributor
Author
There was a problem hiding this comment.
Yes, the changes in this pull request consider both the column type and the value to avoid this.
| email must be(emailValue) | ||
| } | ||
|
|
||
| "don't fail when the column is citext or similar, but the value can be interpreted as Decimal." in withApiClient { |
| email must be(emailValue) | ||
| } | ||
|
|
||
| "don't fail when the column is citext or similar, but the value can be interpreted as Date." in withApiClient { |
| email must be(emailValue) | ||
| } | ||
|
|
||
| "don't fail when the column is citext or similar, but the value can be interpreted as UUID." in withApiClient { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed an Internal Server Error, Caused when attempting to filter by a column is citext or similar, but the value can be interpreted as another type.