CdC-SI / eak-copilot

The official repository of the EAK-Copilot project as part of the Innovation Fellowship 2024.
https://cdc-si.github.io/eak-copilot/
GNU General Public License v3.0
4 stars 0 forks source link

fix api search endpoint response code #125

Open tabee opened 2 months ago

tabee commented 2 months ago

when i write a text in the GUI it does the api calls so far. except i dont see the suggestions in the GUI.

INFO:     172.19.0.1:55916 - "GET /search/?question=b HTTP/1.1" 200 OK
INFO:     172.19.0.1:55930 - "GET /search/?question=be HTTP/1.1" 200 OK
INFO:     172.19.0.1:55934 - "GET /search/?question=bei HTTP/1.1" 200 OK
INFO:     172.19.0.1:55936 - "GET /search/?question=beit HTTP/1.1" 200 OK
INFO:     172.19.0.1:55948 - "GET /search/?question=beitr HTTP/1.1" 200 OK
INFO:     172.19.0.1:55962 - "GET /search/?question=beitr%C3%A4 HTTP/1.1" 200 OK
INFO:     172.19.0.1:55974 - "GET /search/?question=beitr%C3%A4g HTTP/1.1" 200 OK

If there is no exact match, the 500 may be the wrong code to use. 404 would be nice.

INFO:     172.19.0.1:51350 - "GET /search/?question=xxxxxxxxx HTTP/1.1" 500 Internal Server Error
INFO:     172.19.0.1:51350 - "GET /search/?question=xxxxxxxx HTTP/1.1" 500 Internal Server Error
INFO:     172.19.0.1:51350 - "GET /search/?question=xxxxxxx HTTP/1.1" 500 Internal Server Error
INFO:     172.19.0.1:51350 - "GET /search/?question=xxxxxx HTTP/1.1" 500 Internal Server Error
INFO:     172.19.0.1:51350 - "GET /search/?question=xxxxx HTTP/1.1" 500 Internal Server Error

Originally posted by @tabee in #122