-
Notifications
You must be signed in to change notification settings - Fork 284
Open
Labels
EnhancementNew feature or requestNew feature or requestapi-changesChanges in the API for client librariesChanges in the API for client librariesgood first issueGood for newcomersGood for newcomers
Description
Currently Iroha responds this way:
- 200 when transaction is accepted. No response body provided.
- 400 when transaction is not accepted (limits, signature verification, unexpected genesis, chain id mismatch, future timestamp, + queue errors (in queue, in blockchain, expired, maximum txs per user))
- 500 when the queue is full
Proposal
202 Accepted
for when transaction is accepted.
400 Bad Request
for when:
- tx in queue
- tx in blockchain
- tx expired
- tx in future
- limits + maximum txs per user
- chain id mismatch
It would also be consistent to return an encoded error instead of just a string, as /queue
does. Or maybe return both a string and an encoded error.
401 Unauthorized
for when transaction signature verification fails.
403 Forbidden
for when transaction is signed by the genesis account.
503 Service Unavailable
for when the queue is full. This status code is commonly used for temporary conditions.
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or requestNew feature or requestapi-changesChanges in the API for client librariesChanges in the API for client librariesgood first issueGood for newcomersGood for newcomers