mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pyln-client: send proper JSONRPC2 errors on failed call
Changelog-Added: pyln now sends proper error on bad calls to plugin methods Co-Authored-By: Sergi Delgado Segura <sergi.delgado.s@gmail.com>
This commit is contained in:
@@ -19,6 +19,12 @@ def hello(plugin, name="world"):
|
||||
return s
|
||||
|
||||
|
||||
@plugin.method("bye")
|
||||
def bye(plugin, name, **kwargs):
|
||||
"""This methods requires {name} to be set by the caller !"""
|
||||
return "Bye {}".format(name)
|
||||
|
||||
|
||||
@plugin.init()
|
||||
def init(options, configuration, plugin, **kwargs):
|
||||
plugin.log("Plugin helloworld.py initialized")
|
||||
|
||||
Reference in New Issue
Block a user