Skip to content

Improve scalar result coercion execution errors #5375

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

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

swalkinshaw
Copy link
Collaborator

Adds improved handling for coerce_result errors which results in more spec compliant errors with path and locations present.

Separated out from #5306 because this can be merged more easily.

Adds improved handling for `coerce_result` errors which results in more
spec compliant errors with `path` and `locations` present.
expected_error = {
"message" => "\"bad\" can't be Custom value",
"locations" => [{"line"=>1, "column"=>3}],
"path" => ["f2"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Interesting difference here. The input example above (from static validation) includes query in the path and this doesn't.

Looking at the spec, I don't think query should be included? But that's a separate issue (if at all).

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah, query doesn't belong there. Related: #4711

@rmosolgo rmosolgo added this to the 2.5.9 milestone Jun 5, 2025
@rmosolgo
Copy link
Owner

rmosolgo commented Jun 5, 2025

Thanks for this improvement!

@rmosolgo rmosolgo merged commit 7c2af23 into master Jun 5, 2025
15 checks passed
@rmosolgo rmosolgo deleted the improve-scalar-coercion-result-errors branch June 5, 2025 10:53
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