Skip to content

Commit

Permalink
Fix error code returned on GetTransaction Zilliqa#111
Browse files Browse the repository at this point in the history
  • Loading branch information
micovi committed Apr 21, 2020
1 parent f079d00 commit 403131c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ module.exports = {
*/

processGetTransaction: (data) => {
if (!data) {
if (!data || data.length === 0) {
logVerbose(logLabel, 'Invalid params');
const err = new RPCError(
'INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised: Size not appropriate',
Expand All @@ -366,7 +366,7 @@ module.exports = {
return res;
}
const err = new RPCError(
'INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised: Size not appropriate',
'Txn Hash not Present',
errorCodes.RPC_DATABASE_ERROR,
null,
);
Expand Down

0 comments on commit 403131c

Please sign in to comment.