ErrorResponse

@Serializable
interface ErrorResponse

Types

Link copied to clipboard
@Serializable
data class BadJson(val error: String? = null) : ErrorResponse

Request contained valid JSON, but it was malformed in some way, e.g. missing required keys, invalid values for keys.

Link copied to clipboard
@Serializable
data class BadState(val error: String? = null) : ErrorResponse

The state change requested cannot be performed, such as attempting to unban a user who is not banned.

Link copied to clipboard
@Serializable
data class CannotLeaveServerNoticeRoom(val error: String? = null) : ErrorResponse

The user is unable to reject an invite to join the server notices room. See the Server Notices module for more information.

Link copied to clipboard
@Serializable
data class CaptchaInvalid(val error: String? = null) : ErrorResponse

The Captcha provided did not match what was expected.

Link copied to clipboard
@Serializable
data class CaptchaNeeded(val error: String? = null) : ErrorResponse

A Captcha is required to complete the request.

Link copied to clipboard
@Serializable
data class CustomErrorResponse(val errorCode: String, val error: String? = null) : ErrorResponse

All ErrorResponses, that we cannot map to a subtype of ErrorResponse.

Link copied to clipboard
@Serializable
data class Exclusive(val error: String? = null) : ErrorResponse

The resource being requested is reserved by an application service, or the application service making the request has not created the resource.

Link copied to clipboard
@Serializable
data class Forbidden(val error: String? = null) : ErrorResponse

Forbidden access, e.g. joining a room without permission, failed login.

Link copied to clipboard
@Serializable
data class GuestAccessForbidden(val error: String? = null) : ErrorResponse

The room or resource does not permit guests to access it.

Link copied to clipboard
@Serializable
data class IncompatibleRoomVersion(val error: String? = null, val roomVersion: String? = null) : ErrorResponse

The client attempted to join a room that has a version the server does not support. Inspect the room_version property of the error response for the room's version.

Link copied to clipboard
@Serializable
data class InvalidParam(val error: String? = null) : ErrorResponse

A parameter that was specified has the wrong value. For example, the server expected an integer and instead received a string.

Link copied to clipboard
@Serializable
data class InvalidRoomState(val error: String? = null) : ErrorResponse

Sent when the initial state given to the createRoom API is invalid.

Link copied to clipboard
@Serializable
data class InvalidUsername(val error: String? = null) : ErrorResponse

Encountered when trying to register a user ID which is not valid.

Link copied to clipboard
@Serializable
data class LimitExceeded(val error: String? = null, val retryAfterMillis: Long) : ErrorResponse

Too many requests have been sent in a short period of time. Wait a while then try again.

Link copied to clipboard
@Serializable
data class MissingParam(val error: String? = null) : ErrorResponse

A required parameter was missing from the request.

Link copied to clipboard
@Serializable
data class MissingToken(val error: String? = null) : ErrorResponse

No access token was specified for the request.

Link copied to clipboard
@Serializable
data class NotFound(val error: String? = null) : ErrorResponse

No resource was found for this request.

Link copied to clipboard
@Serializable
data class NotJson(val error: String? = null) : ErrorResponse

Request did not contain valid JSON.

Link copied to clipboard
@Serializable
data class ResourceLimitExceeded(val error: String? = null, val adminContact: String? = null) : ErrorResponse

The request cannot be completed because the homeserver has reached a resource limit imposed on it. For example, a homeserver held in a shared hosting environment may reach a resource limit if it starts using too much memory or disk space.

Link copied to clipboard
@Serializable
data class RoomInUse(val error: String? = null) : ErrorResponse

Sent when the room alias given to the createRoom API is already in use.

Link copied to clipboard
@Serializable
data class ServerNotTrusted(val error: String? = null) : ErrorResponse

The client's request used a third party server, eg. identity server, that this server does not trust.

Link copied to clipboard
@Serializable
data class ThirdPIdAuthFailed(val error: String? = null) : ErrorResponse

Authentication could not be performed on the third party identifier.

Link copied to clipboard
@Serializable
data class ThirdPIdDenied(val error: String? = null) : ErrorResponse

The server does not permit this third party identifier. This may happen if the server only permits, for example, email addresses from a particular domain.

Link copied to clipboard
@Serializable
data class ThirdPIdInUse(val error: String? = null) : ErrorResponse

Sent when a threepid given to an API cannot be used because the same threepid is already in use.

Link copied to clipboard
@Serializable
data class ThirdPIdNotFound(val error: String? = null) : ErrorResponse

Sent when a threepid given to an API cannot be used because no record matching the threepid was found.

Link copied to clipboard
@Serializable
data class TooLarge(val error: String? = null) : ErrorResponse

The request or entity was too large.

Link copied to clipboard
@Serializable
data class UnableToAuthoriseJoin(val error: String? = null) : ErrorResponse
Link copied to clipboard
@Serializable
data class UnableToGrantJoin(val error: String? = null) : ErrorResponse
Link copied to clipboard
@Serializable
data class Unauthorized(val error: String? = null) : ErrorResponse

The request was not correctly authorized. Usually due to login failures.

Link copied to clipboard
@Serializable
data class Unknown(val error: String? = null) : ErrorResponse

An unknown error has occurred.

Link copied to clipboard
@Serializable
data class UnknownToken(val error: String? = null, val softLogout: Boolean = false) : ErrorResponse

The access token specified was not recognised.

Link copied to clipboard
@Serializable
data class Unrecognized(val error: String? = null) : ErrorResponse

The server did not understand the request.

Link copied to clipboard
@Serializable
data class UnsupportedRoomVersion(val error: String? = null) : ErrorResponse

The client's request to create a room used a room version that the server does not support.

Link copied to clipboard
@Serializable
data class UserDeactivated(val error: String? = null) : ErrorResponse

The user ID associated with the request has been deactivated. Typically for endpoints that prove authentication, such as /login.

Link copied to clipboard
@Serializable
data class UserInUse(val error: String? = null) : ErrorResponse

Encountered when trying to register a user ID which has been taken.

Link copied to clipboard
@Serializable
data class WrongRoomKeysVersion(val error: String? = null, val currentVersion: String? = null) : ErrorResponse

Properties

Link copied to clipboard
abstract val error: String?

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard