1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added log output, GH-98

This commit is contained in:
krateng 2022-01-16 16:49:17 +01:00
parent 68a450672e
commit efad4379be

View File

@ -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: