Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/plugins/expressions/common/execution/execution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ describe('Execution', () => {
},
});
expect(node2.debug?.rawError).toBeInstanceOf(Error);
expect(node2.debug?.rawError).toEqual(new Error('foo'));
});

test('sets .debug object to expected shape', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/expressions/common/execution/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ export class Execution<
input = output;
} catch (rawError) {
const timeEnd: number = this.params.debug ? performance.now() : 0;
rawError.message = `[${fnName}] > ${rawError.message}`;
const error = createError(rawError) as ExpressionValueError;
error.error.message = `[${fnName}] > ${error.error.message}`;

if (this.params.debug) {
(link as ExpressionAstFunction).debug = {
Expand Down