Lee-W commented on code in PR #33768:
URL: https://github.com/apache/airflow/pull/33768#discussion_r1306319967
##########
airflow/providers/dbt/cloud/hooks/dbt.py:
##########
@@ -234,13 +234,14 @@ async def get_job_details(
endpoint = f"{account_id}/runs/{run_id}/"
headers, tenant = await self.get_headers_tenants_from_connection()
url, params = self.get_request_url_params(tenant, endpoint,
include_related)
- async with aiohttp.ClientSession(headers=headers) as session:
- async with session.get(url, params=params) as response:
- try:
- response.raise_for_status()
- return await response.json()
- except ClientResponseError as e:
- raise AirflowException(str(e.status) + ":" + e.message)
+ async with aiohttp.ClientSession(headers=headers) as session,
session.get(
+ url, params=params
+ ) as response:
+ try:
+ response.raise_for_status()
+ return await response.json()
+ except ClientResponseError as e:
+ raise AirflowException(str(e.status) + ":" + e.message)
Review Comment:
```suggestion
raise AirflowException(f"{e.status}:{e.message}")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]