Skip to content

Improve various schema-related error messages #1817

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
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/jsonschema/bundle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ auto bundle_schema(sourcemeta::core::JSON &root,
}

throw sourcemeta::core::SchemaResolutionError(
identifier, "Could not resolve the requested schema");
identifier, "Could not resolve the reference to an external schema");
}

// Otherwise, if the target schema does not declare an inline identifier,
Expand Down
4 changes: 2 additions & 2 deletions src/core/jsonschema/jsonschema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ auto sourcemeta::core::base_dialect(
resolver(effective_dialect)};
if (!metaschema.has_value()) {
throw sourcemeta::core::SchemaResolutionError(
effective_dialect, "Could not resolve the requested schema");
effective_dialect, "Could not resolve the metaschema of the schema");
}

return base_dialect(metaschema.value(), resolver, effective_dialect);
Expand Down Expand Up @@ -427,7 +427,7 @@ auto sourcemeta::core::vocabularies(const SchemaResolver &resolver,
resolver(dialect)};
if (!maybe_schema_dialect.has_value()) {
throw sourcemeta::core::SchemaResolutionError(
dialect, "Could not resolve the requested schema");
dialect, "Could not resolve the metaschema of the schema");
}
const sourcemeta::core::JSON &schema_dialect{maybe_schema_dialect.value()};
// At this point we are sure that the dialect is vocabulary aware and the
Expand Down