Skip to content

Commit 47232c9

Browse files
chore: Tweak error message for $ref resolution failures
1 parent 3820e3b commit 47232c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

singer_sdk/schema/source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def fetch_schema(self, key: str) -> dict[str, t.Any]:
229229
resolved_schema = resolve_schema_references(schema)
230230
return resolved_schema.get("components", {}).get("schemas", {}).get(key, {}) # type: ignore[no-any-return]
231231
except PointerToNowhere as e:
232-
msg = f"Schema component '{key}' not found"
232+
msg = f"Failed to resolve schema references for '{key}'"
233233
raise SchemaNotFoundError(msg) from e
234234

235235

tests/core/schema/test_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def test_openapi_invalid_component(
288288
source = OpenAPISchema(openapi_file)
289289
with pytest.raises(
290290
SchemaNotFoundError,
291-
match="Schema component 'InvalidComponent' not found",
291+
match="Failed to resolve schema references for 'InvalidComponent'",
292292
):
293293
source.get_schema("InvalidComponent")
294294

0 commit comments

Comments
 (0)