You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK/API correctly tells me that there is an error when trying to process a payment. In this case the issue is that the destination address doesn't exist.
The problem is, the error message is far too long, and possibly subject to change. In our code, it is not realistic to write something like:
if (response.res.data.errors[0] === 'Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 1: invalid account data for instruction') {
console.log('Destination account doesn\'t exist!');
}
The solution:
It would be better if the client received an error from a known list of possible options. For example, the above example should return "DestinationNotFound" or something like that.
The existing Node SDK that uses Agora has the following error mesages:
@showered in #287 we added initial support for better error handling. It should now give back messages like Insufficient funds or Account already exists. Feel free to give it a go and let us know what you think!
The issue:
Here is an example response:
The SDK/API correctly tells me that there is an error when trying to process a payment. In this case the issue is that the destination address doesn't exist.
The problem is, the error message is far too long, and possibly subject to change. In our code, it is not realistic to write something like:
The solution:
It would be better if the client received an error from a known list of possible options. For example, the above example should return "DestinationNotFound" or something like that.
The existing Node SDK that uses Agora has the following error mesages:
The text was updated successfully, but these errors were encountered: