Skip to content

fix: throw validation error when json is passed with invalid unstructured json#4002

Merged
jordan-homan merged 6 commits intomainfrom
error_on_invalid_unstructured_json
May 19, 2025
Merged

fix: throw validation error when json is passed with invalid unstructured json#4002
jordan-homan merged 6 commits intomainfrom
error_on_invalid_unstructured_json

Conversation

@jordan-homan
Copy link
Copy Markdown
Contributor

@jordan-homan jordan-homan commented May 19, 2025

Notes

Adds validation if json / ndjson are not valid unstructured schema.

Testing

Manually tested serverless API with example json:


test_length = [] = 200

test_invalid = [{"invalid": "schema"}] = 422
test_invalid_ndjson ={"hi": "there"} = 422

test_chunk = [{"type":"Header","element_id":"a23fdadef9277f217563e217ebd074d5" ... = 200

@jordan-homan jordan-homan marked this pull request as ready for review May 19, 2025 15:43
@jordan-homan jordan-homan added this pull request to the merge queue May 19, 2025
Merged via the queue into main with commit 570ee07 May 19, 2025
43 checks passed
@jordan-homan jordan-homan deleted the error_on_invalid_unstructured_json branch May 19, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants