-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting error when query transaction #24
Comments
async function getTransactions(accountNumber, sequenceNumber, cb) {
console.log("seq number " + typeof sequenceNumber);
const transaction = await client.getAccountTransaction(
accountNumber,
sequenceNumber
);
cb(transaction);
}
app.get(`${API_URL}/transactions/:address/:sequenceNo`, (req, res) => {
const address = req.params.address || FALLBACK_ADDRESS;
console.log(address);
const sequenceNumber = req.params.sequenceNo || 0;
try {
getTransactions(address, parseInt(sequenceNumber), transaction => {
console.log(transaction);
res.status(200).json(transaction);
});
} catch (error) {
console.log(error);
res.status(500).json(error);
}
}); |
I know why I have not done a coin transfer then I query an unavailable transactions |
I think I would like to re-open this issue there isn't any way to catch the TypeError from outside so I can flag out that no query record is created yet |
This is true. I thought I already caught the case for when a transaction doesn't exist. I'll queue this fix in the current upcoming fixes. Or if you have enough bandwith, your contribution would be welcome |
The text was updated successfully, but these errors were encountered: