Skip to content

Commit d3b7e65

Browse files
kachnitelkbond
authored andcommitted
[LiveComponent] Show component name and id in processRender error
1 parent ede48bc commit d3b7e65

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,9 @@ class Component {
21042104
}
21052105
}
21062106
catch (error) {
2107-
console.error('There was a problem with the component HTML returned:');
2107+
console.error(`There was a problem with the '${this.name}' component HTML returned:`, {
2108+
id: this.id
2109+
});
21082110
throw error;
21092111
}
21102112
this.externalMutationTracker.handlePendingChanges();

src/LiveComponent/assets/src/Component/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,9 @@ export default class Component {
363363
throw new Error('A live component template must contain a single root controller element.');
364364
}
365365
} catch (error) {
366-
console.error('There was a problem with the component HTML returned:');
367-
366+
console.error(`There was a problem with the '${this.name}' component HTML returned:`, {
367+
id: this.id
368+
});
368369
throw error;
369370
}
370371

0 commit comments

Comments
 (0)