Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error messages for invalid json #91

Merged
merged 1 commit into from
Nov 13, 2024
Merged

improve error messages for invalid json #91

merged 1 commit into from
Nov 13, 2024

Conversation

hannesm
Copy link
Contributor

@hannesm hannesm commented Nov 13, 2024

also handle the `Null case in string_or_none

also handle the `Null case in string_or_none
@hannesm hannesm requested a review from PizieDust November 13, 2024 12:58
@@ -56,9 +56,12 @@ let cookie_to_json (cookie : cookie) : Yojson.Basic.t =
]

let string_or_none field = function
| None -> Ok None
| None | Some `Null -> Ok None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the fix needed. all the other changes are just for more informative error messages.

Copy link
Collaborator

@PizieDust PizieDust left a comment

Choose a reason for hiding this comment

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

Thank you @hannesm

@PizieDust PizieDust merged commit 6dfd7ea into main Nov 13, 2024
2 checks passed
@PizieDust PizieDust deleted the errors branch November 13, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants