-
Notifications
You must be signed in to change notification settings - Fork 804
accounts_representatives is failing when one of the account is not opened #3752
Copy link
Copy link
Open
Labels
rpcChanges related to Remote Procedure CallsChanges related to Remote Procedure Calls
Milestone
Description
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 "" or null or undefined for that account.
curl -d '{
"action": "accounts_representatives",
"accounts": ["nano_1openedaccount", "nano_3unopenedaccount"]
}' http://127.0.0.1:7076
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
{
"representatives": {
"nano_1openedaccount": "nano_1repaccount",
"nano_3unopenedaccount": "" or undefined or null
}
}
Actual behavior
{
"error": "Account not found"
}
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
Reactions are currently unavailable
Metadata
Metadata
Labels
rpcChanges related to Remote Procedure CallsChanges related to Remote Procedure Calls