HI all, :bug: :bug: :bug: :bug: :bug: I think ive...
# ask-community
d
HI all, 🐛 🐛 🐛 🐛 🐛 I think ive found a bug. When querying for
task concurrency tag
by tag name if the tag doesnt exist , wrong exception is being raised . Exception being raised :
prefect.exceptions.PrefectHTTPStatusError
Exception that should have been raised :
prefect.exceptions.ObjectNotFound
1
Copy code
from prefect.client.orchestration import get_client

async def create_or_update_task_concurrency_tags(tag_name: str, concurrency_limit: int):
    async with get_client() as client:
        try:
            response = await client.read_concurrency_limit_by_tag(tag_name)
        except Exception as err:
            print(type(err))



if __name__ == "__main__":
    import asyncio

    asyncio.run(create_or_update_task_concurrency_tags("TAG_DOESNT_EXIST", None))
z
👍 makes sense to me — feel free to PR a change to the client to raise the correct error!
d
🫣don't wanna pollute the code with my name
z
Oh goodness 😛
I have faith haha
d
Maybe open an issue like before