Skip to content

catch json ValueError and provide example schema - #281

Merged
awalker4 merged 7 commits into
mainfrom
jj/271-json-schema
Oct 12, 2023
Merged

awalker4 merged 7 commits into
mainfrom
jj/271-json-schema

Conversation

@Coniferish

Copy link
Copy Markdown
Contributor

Closes #271

Catches ValueError raised by partition() and transforms it to a 400 error. Also provides an example of the Unstructured schema.

@Coniferish
Coniferish requested a review from awalker4 October 12, 2023 15:14
@Coniferish
Coniferish marked this pull request as ready for review October 12, 2023 15:41
@awalker4

Copy link
Copy Markdown
Collaborator

LGTM! I think we can put the example schema in the docs somewhere and keep the error message nice and short.

@Coniferish

Copy link
Copy Markdown
Contributor Author

Sounds good. Where in the docs should we add the example, though? Ryan mentioned that there's a PR in progress to add it to the docs, but idk when it'll get added

@awalker4
awalker4 enabled auto-merge (squash) October 12, 2023 20:41
@awalker4
awalker4 merged commit 1121f12 into main Oct 12, 2023
@awalker4
awalker4 deleted the jj/271-json-schema branch October 12, 2023 21:08
@sentry

sentry Bot commented Oct 20, 2023

Copy link
Copy Markdown

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ UnboundLocalError: local variable 'elements' referenced before assignment /general/v0/general View Issue

Did you find this useful? React with a 👍 or 👎

@awalker4

Copy link
Copy Markdown
Collaborator

Addressed in #290

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.

Detected a JSON file that does not conform to the Unstructured schema. partition_json currently only processes serialized Unstructured output.

2 participants