async def aiohttp_error_middleware(request, handler): try: response = await handler(request) return response except BotActionNotImplementedError: raise HTTPNotImplemented() except NotImplementedError: raise HTTPNotImplemented() except PermissionError: raise HTTPUnauthorized() except KeyError: raise HTTPNotFound() except Exception: raise HTTPInternalServerError()
async def aiohttp_error_middleware(request, handler): try: response = await handler(request) return response except BotActionNotImplementedError: raise HTTPNotImplemented() except NotImplementedError: raise HTTPNotImplemented() except PermissionError: raise HTTPUnauthorized() except KeyError: raise HTTPNotFound() except HTTPError as error: # In the case the integration adapter raises a specific HTTPError raise error except Exception: raise HTTPInternalServerError()
async def update_record(self, request): raise HTTPNotImplemented()
async def transfer_record(self, request): raise HTTPNotImplemented()
async def fetch_record(self, request): raise HTTPNotImplemented()
async def list_records(self, request): raise HTTPNotImplemented()
async def authorize(self, request): raise HTTPNotImplemented()