Skip to content

Conversation

@aemada-aws
Copy link
Contributor

Issue # (if applicable)

Closes #34777.

Reason for this change

The 500 response template in StepFunctions integration contains invalid VTL (Velocity Template Language) that produces malformed JSON, causing API Gateway to throw transformation errors when processing 5XX responses.

Description of changes

Fixed the 500 response template by wrapping the error field in proper JSON braces:

  • Changed "error": $input.path('$.error') to { "error": "$input.path('$.error')" }
  • Updated corresponding test to expect the corrected JSON format

This ensures the response template generates valid JSON that API Gateway can properly transform without errors.

Describe any new or updated permissions being added

No new permissions required.

Description of how you validated changes

  • Ran existing unit tests to ensure no regressions
  • All StepFunctions integration tests pass with the corrected template format

Checklist

@aws-cdk-automation aws-cdk-automation requested a review from a team July 4, 2025 15:24
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Jul 4, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 4, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

@aemada-aws aemada-aws marked this pull request as draft July 4, 2025 15:26
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 07a7135
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aemada-aws aemada-aws closed this Jul 7, 2025
@aemada-aws
Copy link
Contributor Author

Closed in favor of #34787

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stepfunctions: invalid vtl in 500 response template

2 participants