FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.24k stars 823 forks source link

Handle IP blocks better on the watch page #5757

Open absidue opened 1 day ago

absidue commented 1 day ago

Handle IP blocks better on the watch page

Pull Request Type

Related issue

closes #5534

Description

This pull request fixes the TypeError: Cannot read properties of null (reading 'reason') error message by correcting where we get the reason property from and by adding a proper error message when the users is IP blocked.

This changes in this pull request are based on the response files provided in this comment https://github.com/FreeTubeApp/FreeTube/issues/5534#issuecomment-2323469591, as I haven't found an IP address that is blocked and nobody responded to this comment asking for information on how to find a blocked IP https://github.com/FreeTubeApp/FreeTube/issues/5534#issuecomment-2367410051

Testing

I have not been able to test this, as I haven't found an IP address that is blocked and nobody responded to this comment asking for information on how to find a blocked IP https://github.com/FreeTubeApp/FreeTube/issues/5534#issuecomment-2367410051

Desktop

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 day ago

As our team cant didnt ran into the IP blocks maybe create test build and provide it to the users of that issue?