mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix: Log single bundle error to browser console
This commit is contained in:
parent
a99f981d3b
commit
5a2a9384cc
2 changed files with 8 additions and 6 deletions
|
|
@ -151,7 +151,13 @@ export default function heliumService($http, $sce, baseUrlSrv) {
|
|||
|
||||
return $http.get(url)
|
||||
.then(function(response, status) {
|
||||
return response.data;
|
||||
const bundle = response.data
|
||||
if (bundle.substring(0, 'ERROR:'.length) === 'ERROR:') {
|
||||
console.error(`Failed to get bundle: ${pkgName}`, bundle);
|
||||
return '' // empty bundle will be filtered later
|
||||
}
|
||||
|
||||
return bundle
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.error(`Failed to get single bundle: ${pkgName}`, error);
|
||||
|
|
@ -260,10 +266,6 @@ export default function heliumService($http, $sce, baseUrlSrv) {
|
|||
|
||||
// load should be promise
|
||||
this.load = p.then(availableBundles => {
|
||||
// if (response.substring(0, 'ERROR:'.length) === 'ERROR:') {
|
||||
// console.error(response);
|
||||
// return
|
||||
// }
|
||||
|
||||
// evaluate bundles
|
||||
availableBundles.map(b => {
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ public class HeliumBundleFactory {
|
|||
|
||||
// remove postfix `.js` for ES6 import
|
||||
if (mainFileName.endsWith(".js")) {
|
||||
mainFileName = mainFileName.substring(0, mainFileName.length() - 2);
|
||||
mainFileName = mainFileName.substring(0, mainFileName.length() - 3);
|
||||
}
|
||||
|
||||
loadJsImport
|
||||
|
|
|
|||
Loading…
Reference in a new issue