mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 00:25:50 -05:00
make negentropy error message format match NIP-01
This commit is contained in:
parent
d473f2cae8
commit
bde7d1c3fa
10
77.md
10
77.md
|
@ -55,13 +55,17 @@ If a request cannot be serviced by the relay, an error is returned to the client
|
|||
]
|
||||
```
|
||||
|
||||
Current reason codes are:
|
||||
Error reasons are the same format as in NIP-01. They should begin with a machine-readable single-word prefix, followed by a `:` and then a human-readable message with more information.
|
||||
|
||||
* `RESULTS_TOO_BIG`
|
||||
The current suggested error reasons are
|
||||
|
||||
* `blocked`
|
||||
* Relays can optionally reject queries that would require them to process too many records, or records that are too old
|
||||
* The maximum number of records that can be processed can optionally be returned as the 4th element in the response
|
||||
* `CLOSED`
|
||||
* Example: `blocked: this query is too big`
|
||||
* `closed`
|
||||
* Because the `NEG-OPEN` queries may be stateful, relays may choose to time-out inactive queries to recover memory resources
|
||||
* Example: `closed: you took too long to respond!`
|
||||
|
||||
After a `NEG-ERR` is issued, the subscription is considered to be closed.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user