zeeguu / web

Frontend for the zeeguu web application.
https://www.zeeguu.org
4 stars 7 forks source link

hitting the API with the wrong data? #534

Open mircealungu opened 1 week ago

mircealungu commented 1 week ago

logs on the backend show that we're calling get_user_infinished_reading_sessions with an inte instead of viewport_settings?

[Thu Sep 12 15:10:10.491181 2024] [wsgi:error] [pid 22:tid 140435464644288] [remote 172.18.0.1:56954]   File "/Zeeguu-API/zeeguu/api/endpoints/user.py", line 111, in get_user_unfinished_reading_sessions
[Thu Sep 12 15:10:10.491198 2024] [wsgi:error] [pid 22:tid 140435464644288] [remote 172.18.0.1:56954]     scrollHeight = viewport_settings["scrollHeight"]
[Thu Sep 12 15:10:10.499501 2024] [wsgi:error] [pid 22:tid 140435464644288] [remote 172.18.0.1:56954]                    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
[Thu Sep 12 15:10:10.501128 2024] [wsgi:error] [pid 22:tid 140435464644288] [remote 172.18.0.1:56954] TypeError: 'int' object is not subscriptable
tfnribeiro commented 1 week ago

Which account did you see this? I think it can be because before sending the viewportSettings in extra data we had the total number of scrolls. So if you haven't opened a new article with the new frontend code then it will still be storing ints, rather than the expected data dictionary.

mircealungu commented 1 week ago

Which account did you see this? I think it can be because before sending the viewportSettings in extra data we had the total number of scrolls. So if you haven't opened a new article with the new frontend code then it will still be storing ints, rather than the expected data dictionary.

It was my main account. And I don't see it anymore. Strange ! I'll keep an eye open for it if it happens again.