Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Document per entry error handling #655

Merged
merged 4 commits into from
Jan 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions docs/commands/rpc-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,27 @@ Returns how many RAW is owned and how many have not yet been received by **accou
}
```

!!! info "Error handling"
With _version 24.0+_, `accounts_balances` response errors are also returned per entry.
```json
{
"balances": {
"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6": {
"balance": "442000000000000000000000000000",
"pending": "0",
"receivable": "0"
},
"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz": {
"error": "Bad account number"
},
"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy": {
"error": "Account not found"
thsfs marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
```


---

### accounts_frontiers
Expand All @@ -365,6 +386,18 @@ Returns a list of pairs of account and block hash representing the head block fo
}
```

!!! info "Error handling"
With _version 24.0+_, `accounts_frontiers` response errors are also returned per entry.
```json
{
"frontiers": {
"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6": "75BD65296241EB871918EBE3E99E9A191970A2724B3214B27F8AB205FF4FC30A",
"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz": "error: Bad account number",
"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy": "error: Account not found"
}
}
```

---

### accounts_pending
Expand Down Expand Up @@ -493,6 +526,18 @@ Returns the representatives for given **accounts**
}
```

!!! info "Error handling"
With _version 24.0+_, `accounts_representatives` response errors are also returned per entry.
```json
{
"representatives": {
"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6": "nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6",
"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz": "error: Bad account number",
"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy": "error: Account not found"
}
}
```

---

### available_supply
Expand Down