Skip to content

Commit 477d7bf

Browse files
authored
Merge pull request #51 from ian-r-rose/fix_error_message
Conditionally use err.response.
2 parents 8159f98 + 0961b3c commit 477d7bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jupyterlab_github/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def get(self, path=''):
103103

104104
except HTTPError as err:
105105
self.set_status(err.code)
106-
self.finish(err.response.body)
106+
message = err.response.body if err.response else str(err.code)
107+
self.finish(message)
107108

108109
def _maybe_get_next_page_path(self, response):
109110
# If there is a 'Link' header in the response, we

0 commit comments

Comments
 (0)