More actionable notification on plugin download failure
Summary: More actionable notification on plugin download failure. Reviewed By: priteshrnandgaonkar Differential Revision: D28856728 fbshipit-source-id: bd4a41af8812168949d83e2e0923ca7976485fa7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fa74502a8a
commit
cc4bc293c6
@@ -116,7 +116,7 @@ async function handlePluginDownload(
|
||||
});
|
||||
if (response.headers['content-type'] !== 'application/octet-stream') {
|
||||
throw new Error(
|
||||
`Unexpected content type ${response.headers['content-type']} received from ${plugin.downloadUrl}`,
|
||||
`It looks like you are not on VPN/Lighthouse. Unexpected content type received: ${response.headers['content-type']}.`,
|
||||
);
|
||||
}
|
||||
const responseStream = response.data as fs.ReadStream;
|
||||
@@ -149,6 +149,7 @@ async function handlePluginDownload(
|
||||
if (startedByUser) {
|
||||
showErrorNotification(
|
||||
`Failed to download plugin "${title}" v${version}.`,
|
||||
'Please check that you are on VPN/Lighthouse.',
|
||||
);
|
||||
}
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user