Skip to content

Commit

Permalink
[DM-29321] Emit response body in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
cbanek committed Mar 26, 2021
1 parent 10a2b4f commit 0d172b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mobu/jupyterclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ async def create_kernel(self, kernel_name: str = "LSST") -> str:

async with self.session.post(kernel_url, json=body) as r:
if r.status != 201:
raise Exception(f"Error {r.status} from {r.url}")
body = await r.text()
raise Exception(f"Error {r.status} from {r.url}: {body}")

response = await r.json()
return response["id"]
Expand Down

0 comments on commit 0d172b5

Please sign in to comment.