2018-12-08 01:39:28 +01:00
|
|
|
/* common/jsonrpc_errors.h
|
2018-02-05 02:19:16 +01:00
|
|
|
* Lists error codes for JSON-RPC.
|
|
|
|
*/
|
2018-12-08 01:39:28 +01:00
|
|
|
#ifndef LIGHTNING_COMMON_JSONRPC_ERRORS_H
|
|
|
|
#define LIGHTNING_COMMON_JSONRPC_ERRORS_H
|
2018-02-05 02:19:16 +01:00
|
|
|
#include "config.h"
|
|
|
|
|
2018-02-08 22:49:35 +01:00
|
|
|
/* Standard errors defined by JSON-RPC 2.0 standard */
|
2018-02-05 02:19:16 +01:00
|
|
|
#define JSONRPC2_INVALID_REQUEST -32600
|
|
|
|
#define JSONRPC2_METHOD_NOT_FOUND -32601
|
|
|
|
#define JSONRPC2_INVALID_PARAMS -32602
|
|
|
|
|
2018-05-24 23:40:18 +02:00
|
|
|
/* Uncategorized error.
|
|
|
|
* FIXME: This should be replaced in all places
|
|
|
|
* with a specific error code, and then removed.
|
|
|
|
*/
|
|
|
|
#define LIGHTNINGD -1
|
2018-07-28 19:34:17 +02:00
|
|
|
|
|
|
|
/* Developer error in the parameters to param() call */
|
|
|
|
#define PARAM_DEV_ERROR -2
|
2018-05-24 23:40:18 +02:00
|
|
|
|
2018-11-26 19:54:06 +01:00
|
|
|
/* Plugin returned an error */
|
|
|
|
#define PLUGIN_ERROR -3
|
|
|
|
|
2018-03-04 06:35:37 +01:00
|
|
|
/* Errors from `pay`, `sendpay`, or `waitsendpay` commands */
|
2018-02-03 12:46:12 +01:00
|
|
|
#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
|
2018-02-17 08:34:31 +01:00
|
|
|
#define PAY_INVOICE_EXPIRED 207
|
2018-03-04 06:35:37 +01:00
|
|
|
#define PAY_NO_SUCH_PAYMENT 208
|
|
|
|
#define PAY_UNSPECIFIED_ERROR 209
|
2018-03-11 15:30:34 +01:00
|
|
|
#define PAY_STOPPED_RETRYING 210
|
2018-02-03 12:46:12 +01:00
|
|
|
|
2018-06-15 18:45:06 +02:00
|
|
|
/* `fundchannel` or `withdraw` errors */
|
|
|
|
#define FUND_MAX_EXCEEDED 300
|
|
|
|
#define FUND_CANNOT_AFFORD 301
|
2018-06-17 06:48:12 +02:00
|
|
|
#define FUND_OUTPUT_IS_DUST 302
|
2019-01-16 14:24:30 +01:00
|
|
|
#define FUNDING_BROADCAST_FAIL 303
|
2019-08-10 12:48:20 +02:00
|
|
|
#define FUNDING_STILL_SYNCING_BITCOIN 304
|
2018-06-15 18:45:06 +02:00
|
|
|
|
2018-04-26 09:42:04 +02:00
|
|
|
/* Errors from `invoice` command */
|
|
|
|
#define INVOICE_LABEL_ALREADY_EXISTS 900
|
|
|
|
#define INVOICE_PREIMAGE_ALREADY_EXISTS 901
|
|
|
|
|
2018-12-08 01:39:28 +01:00
|
|
|
#endif /* LIGHTNING_COMMON_JSONRPC_ERRORS_H */
|