From efad4379be79d6a33ce86c697c531008584431cc Mon Sep 17 00:00:00 2001 From: krateng Date: Sun, 16 Jan 2022 16:49:17 +0100 Subject: [PATCH] Added log output, GH-98 --- maloja/apis/_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maloja/apis/_base.py b/maloja/apis/_base.py index ab7328c..22165c1 100644 --- a/maloja/apis/_base.py +++ b/maloja/apis/_base.py @@ -66,9 +66,10 @@ class APIHandler: exceptiontype = sys.exc_info()[0] if exceptiontype in self.errors: response.status,result = self.errors[exceptiontype] + log(f"Error with {self.__apiname__}: {result} ({exceptiontype})") else: - log("Unhandled Exception with " + self.__apiname__ + ": " + str(exceptiontype)) response.status,result = 500,{"status":"Unknown error","code":500} + log(f"Unhandled Exception with {self.__apiname__}: {exceptiontype}") return result #else: