node: consistent rpc error messages

This commit is contained in:
Braydon Fuller 2019-06-05 12:04:05 -07:00
parent 400d578716
commit f00985fefb
No known key found for this signature in database
GPG Key ID: F24F232D108B3AD4
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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)