node: consistent rpc error messages
This commit is contained in:
parent
400d578716
commit
f00985fefb
@ -613,7 +613,7 @@ class RPC extends RPCBase {
|
||||
const entry = await this.chain.getEntry(hash);
|
||||
|
||||
if (!entry)
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found');
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found.');
|
||||
|
||||
const block = await this.chain.getBlock(entry.hash);
|
||||
|
||||
@ -652,7 +652,7 @@ class RPC extends RPCBase {
|
||||
const entry = await this.chain.getEntry(height);
|
||||
|
||||
if (!entry)
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found');
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found.');
|
||||
|
||||
const block = await this.chain.getBlock(entry.hash);
|
||||
|
||||
@ -706,7 +706,7 @@ class RPC extends RPCBase {
|
||||
const entry = await this.chain.getEntry(hash);
|
||||
|
||||
if (!entry)
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found');
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found.');
|
||||
|
||||
if (!verbose)
|
||||
return entry.toRaw().toString('hex', 0, 80);
|
||||
|
||||
@ -1080,7 +1080,7 @@ class RPC extends RPCBase {
|
||||
if (entry)
|
||||
height = entry.height;
|
||||
else
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found');
|
||||
throw new RPCError(errs.MISC_ERROR, 'Block not found.');
|
||||
}
|
||||
|
||||
if (height === -1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user