Add error codes to our custom errors (#959)

This commit is contained in:
Fábio Rosado
2022-11-25 17:04:10 +00:00
committed by GitHub
parent 30e31a86ef
commit b062efcf17
20 changed files with 306 additions and 67 deletions

View File

@@ -145,7 +145,13 @@ class TestBasic(PyScriptTest):
self.check_js_errors()
error_msg = str(exc.value)
assert "Failed to fetch" in error_msg
if self.is_fake_server:
assert "Failed to fetch" in error_msg
else:
assert (
"Fetching from URL foo.py failed with error 404 (File not found)"
in error_msg
)
pyscript_tag = self.page.locator("py-script")
assert pyscript_tag.inner_html() == ""