mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 04:54:10 +01:00
Error response examples, cribbed from Synapse
This commit is contained in:
parent
f721128371
commit
bd2ccfa91e
|
|
@ -74,15 +74,30 @@ paths:
|
|||
400:
|
||||
description: |-
|
||||
The request body is not a JSON object.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_BAD_JSON",
|
||||
"error": "Content must be a JSON object."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
403:
|
||||
description: |-
|
||||
The access token provided is not authorized to modify this user's account
|
||||
data.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "Cannot add account data for other users."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
405:
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_BAD_JSON",
|
||||
"error": "Cannot set m.fully_read through this API."
|
||||
}
|
||||
description: |-
|
||||
This `type` of account data is controlled by the server; it cannot be
|
||||
modified by clients.
|
||||
|
|
@ -127,11 +142,21 @@ paths:
|
|||
description: |-
|
||||
The access token provided is not authorized to retrieve this user's account
|
||||
data.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "Cannot add account data for other users."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
404:
|
||||
description: |-
|
||||
No account data has been provided for this user with the given `type`.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_NOT_FOUND",
|
||||
"error": "Room account data not found."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
tags:
|
||||
|
|
@ -190,18 +215,33 @@ paths:
|
|||
400:
|
||||
description: |-
|
||||
The request body is not a JSON object.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_BAD_JSON",
|
||||
"error": "Content must be a JSON object."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
403:
|
||||
description: |-
|
||||
The access token provided is not authorized to modify this user's account
|
||||
data.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "Cannot add account data for other users."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
405:
|
||||
description: |-
|
||||
This `type` of account data is controlled by the server; it cannot be
|
||||
modified by clients.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_BAD_JSON",
|
||||
"error": "Cannot set m.fully_read through this API."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
tags:
|
||||
|
|
@ -250,12 +290,22 @@ paths:
|
|||
description: |-
|
||||
The access token provided is not authorized to retrieve this user's account
|
||||
data.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "Cannot add account data for other users."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
404:
|
||||
description: |-
|
||||
No account data has been provided for this user and this room with the
|
||||
given `type`.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_NOT_FOUND",
|
||||
"error": "Room account data not found."
|
||||
}
|
||||
schema:
|
||||
$ref: "../client-server/definitions/errors/error.yaml"
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Reference in a new issue