Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

set key to default "" in order for iterator not to fail #28

Open
Jojoooo1 opened this issue Jul 23, 2019 · 1 comment
Open

set key to default "" in order for iterator not to fail #28

Jojoooo1 opened this issue Jul 23, 2019 · 1 comment

Comments

@Jojoooo1
Copy link

async getHistoryForKey (key) {
   return await this.handler.handleGetHistoryForKey(key, this.channel_id, this.txId);
}

if key does not exist it will return a MockHistoryQueryIterator where data is undefined { data: undefined, [...] } which will cause errors when executing the iterator.

@sneljo1
Copy link
Contributor

sneljo1 commented Aug 1, 2019

Is this the behaviour of the actual chaincode? or should this be an empty array?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants