better jsonrpc error description - use code numbers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
What happened?
{
"id": 1,
"jsonrpc": "2.0",
"error": {
"code": 1,
"message": "Tato faktura již byla zaplacena"
}
}
Without knowing my language you have no idea, what happened. Yeah, this error is returned, when lnpay tries to pay already paid invoice. However, apropriate code and description should be used, to able to process the error by a machine (not human).
Code is always 1. I bet that code 1 is unhandled exception error.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the JSON-RPC response path used when lnpay attempts to pay an already-paid invoice. Review how the current code and message are selected, then define the machine-readable error-code behavior and verify that the response is no longer dependent on the user's language.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100