def METHOD_NAME(handler: Handler):
    @functools.wraps(handler)
    async def wrapper(request: web.Request) -> web.StreamResponse:
        try:
            return await handler(request)
        except TagNotFoundError as exc:
            raise web.HTTPNotFound(reason=f"{exc}") from exc
        except TagOperationNotAllowed as exc:
            raise web.HTTPUnauthorized(reason=f"{exc}") from exc
    return wrapper