Skip to content

Throw more detailed error messages when encountering Json Schema errors#1707

Merged
RicoSuter merged 2 commits into
RicoSuter:masterfrom
hyzx86:patch-1
Mar 29, 2025
Merged

Throw more detailed error messages when encountering Json Schema errors#1707
RicoSuter merged 2 commits into
RicoSuter:masterfrom
hyzx86:patch-1

Conversation

@hyzx86
Copy link
Copy Markdown
Contributor

@hyzx86 hyzx86 commented Jun 24, 2024

fixes: #1429

@hyzx86
Copy link
Copy Markdown
Contributor Author

hyzx86 commented Jun 24, 2024

Hi @bencyoung-Fignum I'm trying to deal with this issue, but since it's been a while I'm not sure if it still exists.
Also it doesn't seem to be in the same position looking at your screenshot.
Can you provide more info on this? Or maybe you pull my PR and try it.

@bencyoung-Fignum
Copy link
Copy Markdown

I don't think that will help me as there's no identifying names on the one that doesn't get a value. The only interesting thing about it is IsAnyType is true. However it has no properties or anything else naming it

image

Comment thread src/NJsonSchema/JsonPathUtilities.cs Outdated
@RicoSuter
Copy link
Copy Markdown
Owner

RicoSuter commented Jul 17, 2024

Is this still needed? I'm fine merging this as it's not really breaking or anything...
Maybe it produces way too much text in the exception message.

Co-authored-by: Rico Suter <mail@rsuter.com>
@hyzx86
Copy link
Copy Markdown
Contributor Author

hyzx86 commented Jul 17, 2024

Maybe it produces way too much text in the exception message.

I think these texts are worthwhile. they can be somewhat easier for developers to locate the problem.
After all, it has happened exceptionally 😅

@RicoSuter RicoSuter merged commit 10171e8 into RicoSuter:master Mar 29, 2025
@RicoSuter
Copy link
Copy Markdown
Owner

Thanks for the PR.

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.

Could not find the JSON path of a referenced schema

3 participants