-
Notifications
You must be signed in to change notification settings - Fork 790
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
accounts_representatives
is failing when one of the account is not opened
#3752
Comments
This is the code that handles the RPC:
The only way I can explain what is happening is, the variable |
Yeap, just as I thought. If
|
Looking at the code for RPC
|
|
They do produce different results atm, I could argue that leaving the |
@clemahieu Prefers to leave the @thsfs Can you help get a PR up for the changes noted above? |
@clemahieu After discussing with @thsfs there are two cases that came up and the first seems like the right way to do it, but we'd like your thoughts on the second one:
a) Add an error to the value for the specific account key with the failure:
or b) return an error for the whole call with the first account that was found invalid (this forces account validation prior to calling, which seems reasonable):
(note that error text is found in common errors here) |
|
@dsiganos For the cases where the account is unopened, do you suggest we return that new error format with Account not found, so |
Yes, that makes sense to me. It is simple, consistent and there is no loss of information. |
Summary
Original PR: #3409
When using the
accounts_representatives
RPC if one of the account in the list is not opened, it returns an error message instead of setting the representative response value to""
ornull
orundefined
for that account.Node version
V23
Build details
Production build
OS and version
unrelated
Steps to reproduce the behavior
Query the
accounts_representative
with opened and unopened accounts.Expected behavior
Actual behavior
Possible solution
include the unopened account in the response but mark the rep as an empty string
""
(preferred solution since it would be easier to read the response with missing reps than trying to diff the accounts sent in parameters vs the response)or
exclude the unopened account from the response
Supporting files
No response
The text was updated successfully, but these errors were encountered: