File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,14 @@ const { JsonataTransform } = require('@elastic.io/component-commons-library');
8
8
* @param cfg configuration that is account information and configuration field values
9
9
*/
10
10
async function processAction ( msg , cfg ) {
11
- const result = JsonataTransform . jsonataTransform ( msg , cfg , this ) ;
11
+ let result ;
12
+ try {
13
+ result = JsonataTransform . jsonataTransform ( msg , cfg , this ) ;
14
+ } catch ( e ) {
15
+ this . logger . error ( 'Jsonata transformation failed!' ) ;
16
+ this . logger . trace ( `Jsonata transformation failed: ${ e } ` ) ;
17
+ throw new Error ( 'Jsonata transformation failed!' ) ;
18
+ }
12
19
this . logger . info ( 'Evaluation completed' ) ;
13
20
if ( result === undefined || result === null || Object . keys ( result ) . length === 0 ) {
14
21
return Promise . resolve ( ) ;
You can’t perform that action at this time.
0 commit comments