Skip to content

Commit

Permalink
fix: insert line feed in concatenated trace
Browse files Browse the repository at this point in the history
  • Loading branch information
yicr committed Jun 3, 2024
1 parent a98c46e commit c87c010
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class LambdaFunctionInvokeErrorNotificationStack extends cdk.Stack {
sfn.JsonPath.stringAt('$.account'),
sfn.JsonPath.stringAt('$.region'),
),
Message: sfn.JsonPath.format('Account : {}\nRegion : {}\nFunction : {}\nErrorMessage : {}\nTrace : {}',
Message: sfn.JsonPath.format('Account : {}\nRegion : {}\nFunction : {}\nErrorMessage : {}\nTrace : \n{}',
sfn.JsonPath.stringAt('$.account'),
sfn.JsonPath.stringAt('$.region'),
sfn.JsonPath.stringAt('$.detail.requestContext.functionArn'),
Expand Down Expand Up @@ -82,7 +82,7 @@ export class LambdaFunctionInvokeErrorNotificationStack extends cdk.Stack {

const concatenateValue: sfn.Pass = new sfn.Pass(this, 'Concatenate', {
parameters: {
Trace: sfn.JsonPath.format('{}{}', sfn.JsonPath.stringAt('$.Prepare.Concatenated.Trace'), sfn.JsonPath.stringAt('$.Temp.GetTrace.Line')),
Trace: sfn.JsonPath.format('{}{}\n', sfn.JsonPath.stringAt('$.Prepare.Concatenated.Trace'), sfn.JsonPath.stringAt('$.Temp.GetTrace.Line')),
},
resultPath: '$.Prepare.Concatenated',
});
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/hello.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c87c010

Please sign in to comment.