add detailed flag to GET service api client

returns current (past 7 days) notification stats as well as service info
This commit is contained in:
Leo Hemsted
2016-07-19 13:53:27 +01:00
parent d9944107da
commit 4451a8634d
5 changed files with 39 additions and 16 deletions

View File

@@ -324,7 +324,11 @@ def register_errorhandlers(application):
@application.errorhandler(HTTPError)
def render_http_error(error):
application.logger.error("API called failed with status {} message {}".format(error.status_code, error.message))
application.logger.error("API {} failed with status {} message {}".format(
error.response.url,
error.status_code,
error.message
))
error_code = error.status_code
if error_code not in [401, 404, 403, 500]:
error_code = 500