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.
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(9586): implement freetext search in cht datasource #9625
base: master
Are you sure you want to change the base?
feat(9586): implement freetext search in cht datasource #9625
Changes from all commits
ac0ab67
cd11adc
b7c5d1f
f91e393
52ac11b
c1b68cf
45c0ccf
acf903a
89927b1
45abf58
6f5c326
192af16
bb98dcf
43efbef
ede85fd
2b33c07
3bfcace
074b0c1
1907907
a629116
c45cee8
5400736
bf46e4a
b1cf669
98fd4e2
ee32262
b5bc6e6
4a18fc8
eba1b61
9157059
d5fed9c
30d058e
662598c
89eb816
3ea31ef
a7a9272
ef8b93f
43c3896
f97f928
2065125
f8087b9
e6aea4f
c21e52a
c487a7e
ce1013a
19143b4
8dc7de3
91a0125
49553b7
22da4b9
4a0d2bb
bfa0a57
eab5877
1cca39c
abff459
9673d78
6f1280a
a79d93f
be48c13
e523a25
d4bc934
783d9d6
d7f8ca1
9fc41d9
423ee0a
2641477
faac438
6878952
70e0db5
f8c7be5
760e916
91ef121
bac5e2c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of this callback style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been doing this pattern for all the REST endpoints that call
cht-datasource
. What's the alternative?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO
doOrError
is a nice way to reduce duplicated code and ensure we are handling errors consistently.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a try-catch block is not so much duplication, and it's more transparent than a nested callback.
I understand this already exists. I'm not a fan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So ... this endpoint .. if it doesn't get neither a
freetext
query param or alimit
query param, it will end up returning ALL reports?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope. it returns a
400 - Bad request
error becausefreetext
is required whereaslimit
is set to a default of 10000.