Skip to content

Commit 24fbfb2

Browse files
authored
Return meaningful error in case of plugin script failed to load
1 parent c0747ea commit 24fbfb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/loadPlugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default async function loadPlugin(pluginId, justInstalled = false) {
1212
const $script = <script src={Url.join(baseUrl, "main.js")}></script>;
1313

1414
$script.onerror = (error) => {
15-
reject(new Error(`Failed to load script for plugin ${pluginId}`));
15+
reject(new Error(`Failed to load script for plugin ${pluginId}: ${error.message || error}`));
1616
};
1717

1818
$script.onload = async () => {

0 commit comments

Comments
 (0)