Skip to content

Commit 8be220d

Browse files
authored
chore(docs): Update error message (#485)
update error message
1 parent f5f9e25 commit 8be220d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

advanced_alchemy/types/file_object/registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_backend(self, key: str) -> "StorageBackend":
6464
try:
6565
return self._registry[key]
6666
except KeyError as e:
67-
msg = f"No storage backend registered with key {key}"
67+
msg = f'No storage backend registered with key "{key}"'
6868
raise ImproperConfigurationError(msg) from e
6969

7070
@overload

tests/integration/test_file_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ async def test_obstore_backend_storage_registry_management(storage_registry: Sto
999999
async def test_obstore_backend_storage_registry_error_handling(storage_registry: StorageRegistry) -> None:
10001000
"""Test StorageRegistry error handling."""
10011001
# Test get_backend with non-existent key
1002-
with pytest.raises(ImproperConfigurationError, match="No storage backend registered with key nonexistent"):
1002+
with pytest.raises(ImproperConfigurationError, match='No storage backend registered with key "nonexistent"'):
10031003
storage_registry.get_backend("nonexistent")
10041004

10051005
# Test unregister_backend with non-existent key

0 commit comments

Comments
 (0)