atlassian-python-api
atlassian-python-api copied to clipboard
the API should not log exceptions and return "None".
When searching for a page (using get_page_by_title
) if the page does not exist, this currently gets executed:
except (IndexError, TypeError) as e:
log.error("Can't find '%s' page on the %s!", title, self.url)
log.debug(e)
return None
(it also happens in update_page).
Please don't do this -- but rather return the exception back to the caller to handle what to do with the exception. The caller may want to handle it in some way and not have a ton of debug output printed out to the console or what not.
merely removing the try/except block would be much more useful.