mirror of
https://github.com/cadmium-im/cadmium-docs-legacy.git
synced 2024-11-09 12:11:03 +00:00
Correct Protocol Errors extension - add ok variable
This commit is contained in:
parent
70f490c72e
commit
4e0c4b1d11
@ -62,6 +62,12 @@
|
||||
"type": "object",
|
||||
"title": "payload",
|
||||
"description": "Message payload (used to store extra information in message, list of permissible fields in the payload depends on \"type\" field)"
|
||||
},
|
||||
"ok": {
|
||||
"$id": "#/properties/ok",
|
||||
"type": "boolean",
|
||||
"title": "ok",
|
||||
"description": "Indicating whether request have an error"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Protocol Errors
|
||||
## Introduction
|
||||
Mechanism of error processing included into protocol.
|
||||
Adds into any type ID `:error` postfix.
|
||||
Adds into any response message `ok` variable. If `ok` is true - we have no errors, if `ok` is false - we have an error.
|
||||
|
||||
## Message type identifiers
|
||||
- `*:error`
|
||||
@ -24,9 +24,10 @@ Adds into any type ID `:error` postfix.
|
||||
```json
|
||||
{
|
||||
"id": "abcd",
|
||||
"type": "incorrectMessageType:error",
|
||||
"type": "incorrectMessageType",
|
||||
"from": "cadmium.im",
|
||||
"to": "@juliet@cadmium.im",
|
||||
"ok": false,
|
||||
"payload": {
|
||||
"errCode": 0,
|
||||
"errText": "Incorrect type of message (type isn't implemented in the server)",
|
||||
|
Loading…
Reference in New Issue
Block a user