Skip to content

Commit 84228c1

Browse files
committed
show stack trace for some rendering errors
1 parent 7a1a664 commit 84228c1

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Since [Plotly.js](https://plotly.com/javascript/) is the main dependency of this
1010
application, major version changes in Plotly.js will also trigger a major
1111
version change in this application.
1212

13+
## Version 5.8.9 (2024-10-27)
14+
15+
* __[improvement]__
16+
A stack trace for some rendering errors is now logged to the console, if a stack
17+
trace is available.
18+
1319
## Version 5.8.8 (2024-10-25)
1420

1521
* __[maintenance]__

export-server/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

export-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plotly-node-export-server",
3-
"version": "5.8.8",
3+
"version": "5.8.9",
44
"description": "Plotly.js Node.js export server",
55
"repository": {
66
"url": "https://gitlab.com/striezel/plotly-node-export-server.git",

export-server/ssr.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ exports.render = async function(jsonData, filename, width, height) {
101101
})
102102
.catch(function(error) {
103103
console.log("Error occurred: " + error);
104+
let hasStack = error.stack && typeof error.stack === 'string';
105+
if (hasStack) {
106+
console.log("Stack trace: " + error.stack);
107+
}
104108
result = { success: false, failure: 'promise-rejected' };
105109
return result;
106110
});

0 commit comments

Comments
 (0)