-
Notifications
You must be signed in to change notification settings - Fork 244
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
[Bug] Internal Server Error from data-infographics API #2736
Comments
@ziv17 can you take a look? |
Hi @atalyaalon , |
Hi @atalyaalon , |
I don't think this is the case - since the current news flash id 231352 exists in production However, if it's not found I guess we should return some kind of error, perhaps 404 code? |
I think we need differ between 2 cases:
For the first case, which, I believe is our current case, I suggest that for now, sending an empty list is fine, and we might want to send in the future a special widget indicating that no accidents in DB for this location. For the second case - I think that sending this error is OK Is it easy to differ these two cases? |
Hi @atalyaalon ,
Should we differ between location does not exist and given |
Hi @atalyaalon ,
|
I guess it would be a best practice, either to differ or to have a debug log for that |
Hi @atalyaalon ,
|
To summarize:
|
Describe the bug
when querying this news flash - news flash id=231352
When looking at newsflash API street1_hebrew has \t in it.
I think that's that's one problem we need to fix, perhaps with strip func before adding yishuvs/streets to DB (but not all of it, I think there is another problem):
In addition, when using the search API for this street, we get the same Internal Server Error. Does this mean that this street has no data? https://anyway-infographics-staging.web.app/cityAndStreet/%D7%A2%D7%A8%D7%A2%D7%A8%D7%94/%D7%90%D7%9C%20%D7%93%D7%94%D7%A8%D7%90%D7%AA
To Reproduce
API: https://www.anyway.co.il/api/infographics-data?lang=he&news_flash_id=231352&years_ago=5
Expected behavior
Return widgets if there are any for the newsflash location, and no widgets (empty dict as json) if there aren't any for the newsflash location
Screenshots

Environment
System: Mac
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: