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