Skip to content

Commit bca8cf5

Browse files
committed
Improve various schema-related error messages
Signed-off-by: Juan Cruz Viotti <[email protected]>
1 parent ef8f620 commit bca8cf5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/jsonschema/bundle.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ auto bundle_schema(sourcemeta::core::JSON &root,
107107
}
108108

109109
throw sourcemeta::core::SchemaResolutionError(
110-
identifier, "Could not resolve the requested schema");
110+
identifier, "Could not resolve the reference to an external schema");
111111
}
112112

113113
// Otherwise, if the target schema does not declare an inline identifier,

src/core/jsonschema/jsonschema.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ auto sourcemeta::core::base_dialect(
310310
resolver(effective_dialect)};
311311
if (!metaschema.has_value()) {
312312
throw sourcemeta::core::SchemaResolutionError(
313-
effective_dialect, "Could not resolve the requested schema");
313+
effective_dialect, "Could not resolve the metaschema of the schema");
314314
}
315315

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

0 commit comments

Comments
 (0)