API: validation: mention invalid method name (#8489)

This commit is contained in:
Justin M. Keyes
2018-06-07 10:56:44 +02:00
committed by GitHub
parent 5a82afa17a
commit 3abf17ae88
7 changed files with 37 additions and 11 deletions

View File

@@ -493,7 +493,8 @@ Object msgpack_rpc_handle_missing_method(uint64_t channel_id,
Array args,
Error *error)
{
api_set_error(error, kErrorTypeException, "Invalid method name");
api_set_error(error, kErrorTypeException, "Invalid method: %s",
args.size > 0 ? args.items[0].data.string.data : "?");
return NIL;
}