-
Notifications
You must be signed in to change notification settings - Fork 75
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
Reduce accepted error codes on mirror node contracts/call #1276
Comments
@Nana-EC, taking a further look at this, my take is that the mirrorNode Client is the one that is returning In some, is part of the logic, and in some they do return an exception, and in some as you noted, it might end-up returning My suggestion is to always return the corresponding error from the mirrorNodeClient and instead of the methods using the mirror node handling the I am not sure how much we want to use try catch as part of the flow of code, thus making this comment. |
Problem
Currently the relay will accept error code in
acceptedErrorStatusesResponsePerRequestPathMap[MirrorNodeClient.CONTRACT_CALL_ENDPOINT]
and not throw an error.This may be problematic as it would return a
0x
value instead of throwing to clients.Solution
Verify that
0x
is not an appropriate value to return on any of these codes.Assuming so reduce the array of codes to an empty array
[]
In this way all error from the mirror node would result in errors to the user.
Also remove the
0x
return incallMirrorNode()
if not applicableEndpoints to refactor:
Alternatives
No response
The text was updated successfully, but these errors were encountered: