avantifellows/plio-frontend

BUG: 400 during `events/` call

deepansh96 opened this issue · 0 comments

A POST call to events/ is made every few seconds when someone is on the player. In the POST call, player time is sent as this.player.currentTime.

Screenshot 2021-11-05 at 9 23 42 AM

Sometimes when the player is loading up, the POST call is made before the plyr has been initialised.
This leads to player_time being sent as null as this.player.currentTime is null.

And this leads to a 400 BAD REQUEST error as a null player_time is not allowed by the backend.

This is also the most encountered issue logged by sentry
https://sentry.io/organizations/avanti-fellows-af/issues/2631317729/?project=5828567&query=is%3Aunresolved&sort=freq&statsPeriod=14d