mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Improved API logging slightly
This commit is contained in:
parent
6dd3fe5512
commit
8250c7b467
@ -67,6 +67,7 @@ class APIHandler:
|
||||
if exceptiontype in self.errors:
|
||||
response.status,result = self.errors[exceptiontype]
|
||||
else:
|
||||
log("Unhandled Exception with " + self.__apiname__ + ": " + str(exceptiontype))
|
||||
response.status,result = 500,{"status":"Unknown error","code":500}
|
||||
|
||||
return result
|
||||
@ -81,7 +82,7 @@ class APIHandler:
|
||||
methodname = self.get_method(path,keys)
|
||||
method = self.methods[methodname]
|
||||
except:
|
||||
log("Could not find a handler for method " + methodname + " in API " + self.__apiname__,module="debug")
|
||||
log("Could not find a handler for method " + str(methodname) + " in API " + self.__apiname__,module="debug")
|
||||
log("Keys: " + str(keys),module="debug")
|
||||
raise InvalidMethodException()
|
||||
return method(path,keys)
|
||||
|
@ -141,7 +141,6 @@ def get_performance_external(**keys):
|
||||
|
||||
@api.get("top/artists")
|
||||
def get_top_artists_external(**keys):
|
||||
print(uri_to_internal(keys))
|
||||
_, k_time, k_internal, _, _ = uri_to_internal(keys)
|
||||
ckeys = {**k_time, **k_internal}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user