pay: Provide detailed errors on sendpay or pay failure.

Fixes: #866
This commit is contained in:
ZmnSCPxj
2018-02-03 11:46:12 +00:00
committed by Christian Decker
parent 452925c05a
commit a6c6b8d9d3
2 changed files with 94 additions and 25 deletions

View File

@@ -10,4 +10,13 @@
#define JSONRPC2_METHOD_NOT_FOUND -32601
#define JSONRPC2_INVALID_PARAMS -32602
/* Errors from `pay` and `sendpay` commands */
#define PAY_IN_PROGRESS 200
#define PAY_RHASH_ALREADY_USED 201
#define PAY_UNPARSEABLE_ONION 202
#define PAY_DESTINATION_PERM_FAIL 203
#define PAY_TRY_OTHER_ROUTE 204
#define PAY_ROUTE_NOT_FOUND 205
#define PAY_ROUTE_TOO_EXPENSIVE 206
#endif /* !defined (LIGHTNING_LIGHTNINGD_JSONRPC_ERRORS_H) */