diff --git a/lightningd/pay.c b/lightningd/pay.c index a6b4292c417f..cd21140abd1a 100644 --- a/lightningd/pay.c +++ b/lightningd/pay.c @@ -1462,7 +1462,7 @@ static struct command_result *json_createonion(struct command *cmd, if (sphinx_path_payloads_size(sp) > ROUTING_INFO_SIZE) return command_fail( - cmd, LIGHTNINGD, + cmd, JSONRPC2_INVALID_PARAMS, "Payloads exceed maximum onion packet size."); packet = create_onionpacket(cmd, sp, &shared_secrets);