Skip to content

Commit 01390cf

Browse files
author
Richard Bell
committed
Log as JSON
1 parent 7c60a61 commit 01390cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/integration/notebook/test_notebook_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def _create_notebook(
5252
try:
5353
notebook_response = client.create_notebook(metadata=metadata, content=file)
5454
except ApiException as e:
55-
logging.warning(f"Error creating notebook: {metadata}")
55+
logging.warning(f"Error creating notebook: {metadata.json(by_alias=True, exclude_unset=True)}")
5656
raise
5757
if cleanup:
5858
notebook_ids.append(notebook_response.id)
@@ -78,7 +78,8 @@ def _update_notebook(
7878
try:
7979
notebook_response = client.update_notebook(id=id, metadata=metadata, content=content)
8080
except ApiException as e:
81-
logging.warning(f"Error updating notebook {id}: {metadata}")
81+
if (metadata is not None):
82+
logging.warning(f"Error updating notebook {id}: {metadata.json(by_alias=True, exclude_unset=True)}")
8283
raise
8384

8485
return notebook_response

0 commit comments

Comments
 (0)