Skip to content

sdlf-legislators-main-A-sm Step Functions state machine fails due to malformed json (regions.json) #514

@mashaor

Description

@mashaor

Summary

The sdlf-legislators-main-A-sm Step Functions state machine fails due to a malformed regions.json file. The issue occurs in the sdlf-legislators-main-A-process Lambda function while attempting to parse the JSON data.

Steps to Reproduce

Upload a regions.json file to the Raw bucket.
The Step Functions state machine sdlf-legislators-main-A-sm is triggered.
The Lambda function sdlf-legislators-main-A-process attempts to parse the JSON file.
The process fails, without a viable error. 
 Review one of the "MapStateExited" logs to find the JSON parsing error

Error Details

"error": "JSONDecodeError('Extra data: line 2 column 1 (char 85)')"

Code Location: sdlf-legislators-main-A-process Lambda function Line 49:

json_data = json.loads(data)

Root Cause:

regions.json file is not a valid JSON

SDLF release (if known):
2.x.x

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions