feat: alters all standart errors and messages for more specific errors

This commit is contained in:
2025-09-14 00:05:21 -03:00
parent f4d84d2749
commit 30290771b1
11 changed files with 94 additions and 39 deletions

View File

@@ -40,7 +40,7 @@ class TestRefTypeParser(TestCase):
},
}
with self.assertRaises(RuntimeError):
with self.assertRaises(ValueError):
RefTypeParser().from_properties(
"person",
properties,
@@ -63,7 +63,7 @@ class TestRefTypeParser(TestCase):
},
}
with self.assertRaises(RuntimeError):
with self.assertRaises(ValueError):
RefTypeParser().from_properties(
"person",
properties,

View File

@@ -187,7 +187,8 @@ class TestStringTypeParser(TestCase):
parser.from_properties("placeholder", properties)
self.assertEqual(
str(context.exception), "Unsupported string format: unsupported-format"
str(context.exception),
"Invalid JSON Schema: Unsupported string format: unsupported-format (invalid field: format)",
)
def test_string_parser_with_date_format(self):