log dropped api request instead of stack trace

This commit is contained in:
Victor Shyba 2019-02-22 00:36:23 -03:00 committed by Jack Robison
parent 9f071bbe36
commit e047748961
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -489,6 +489,9 @@ class Daemon(metaclass=JSONRPCServerType):
if asyncio.iscoroutine(result): if asyncio.iscoroutine(result):
result = await result result = await result
return result return result
except asyncio.CancelledError:
log.info("cancelled API call for: %s", function_name)
raise
except Exception as e: # pylint: disable=broad-except except Exception as e: # pylint: disable=broad-except
log.exception("error handling api request") log.exception("error handling api request")
return JSONRPCError( return JSONRPCError(