Skip to content

Conversation

@brettpthomas
Copy link
Contributor

Users can upload Python objects as input data, but they must be serialize to JSON.

try:
json.dumps(tasks_data)
except (TypeError, ValueError):
raise SurgeTaskDataError("All task data must be JSON-serializable")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nice to surface the real JSON error too in case it's informative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have any preference for how to do that?

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.

3 participants