mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 23:10:18 +00:00
Db Async delete 404 keyerror
Make async delete raise key error if it runs into a non-existent key
This commit is contained in:
@@ -63,6 +63,8 @@ class AsyncDatabase:
|
||||
async with session.delete(
|
||||
self.db_url + "/" + urllib.parse.quote(key)
|
||||
) as response:
|
||||
if(response.status_code==404):
|
||||
raise KeyError(key)
|
||||
response.raise_for_status()
|
||||
|
||||
async def list(self, prefix: str) -> Tuple[str, ...]:
|
||||
|
||||
Reference in New Issue
Block a user