-
-
Notifications
You must be signed in to change notification settings - Fork 890
web: If fetch fails because HttpNotOk, always display error-swf-fetch #20792
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
base: master
Are you sure you want to change the base?
web: If fetch fails because HttpNotOk, always display error-swf-fetch #20792
Conversation
@@ -2070,9 +2073,12 @@ export class InnerPlayer { | |||
) { | |||
this.addOpenInNewTabMessage(openInNewTab, this.swfUrl); | |||
} else { | |||
const fetchStatusNotOk = fetchError.includes( | |||
"HTTP Status is not OK:", | |||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 182 to 183 in fb9bddd
#[error("HTTP Status is not OK: {0} redirected: {1}")] | |
HttpNotOk(String, u16, bool, u64), |
PR has been changed (commits should be squashed if this approach is taken, they are separate so I can revert to the old approach if preferred). Now, if the |
@@ -185,6 +185,7 @@ function createPanicError(error: Error | null): { | |||
|
|||
if ( | |||
window.location.origin === error.swfUrl?.origin || | |||
error.statusNotOk || | |||
// The extension's internal player page is not restricted by CORS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other checks can probably be removed from here, but not certain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!!
Unfortunately, it's another new parameter to display_root_movie_download_failed_message (see #14715), but I think it should work as another way to accomplish #20770 without a hard-coded URL.