Types

Link copied to clipboard
@Serializable
@SerialName(value = "M_APPSERVICE_LOGIN_UNSUPPORTED")
data class AppserviceLoginUnsupported(val error: String) : ErrorResponse

An application service used the m.login.application_service type without setting inhibit_login to true, but the server doesn't support logging in via the Legacy authentication API.

Link copied to clipboard
@Serializable
@SerialName(value = "M_BAD_JSON")
data class BadJson(val error: String) : 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
@SerialName(value = "M_BAD_STATE")
data class BadState(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM")
data class CannotLeaveServerNoticeRoom(val error: String) : 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
@SerialName(value = "M_CAPTCHA_INVALID")
data class CaptchaInvalid(val error: String) : ErrorResponse

The Captcha provided did not match what was expected.

Link copied to clipboard
@Serializable
@SerialName(value = "M_CAPTCHA_NEEDED")
data class CaptchaNeeded(val error: String) : ErrorResponse

A Captcha is required to complete the request.

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

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_DUPLICATE_ANNOTATION")
data class DuplicateAnnotation(val error: String) : ErrorResponse

No resource was found for this request.

Link copied to clipboard
@Serializable
@SerialName(value = "M_EXCLUSIVE")
data class Exclusive(val error: String) : 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
@SerialName(value = "M_FORBIDDEN")
data class Forbidden(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_GUEST_ACCESS_FORBIDDEN")
data class GuestAccessForbidden(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_INCOMPATIBLE_ROOM_VERSION")
data class IncompatibleRoomVersion(val error: String, 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
@SerialName(value = "M_INVALID_PARAM")
data class InvalidParam(val error: String) : 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
@SerialName(value = "M_INVALID_ROOM_STATE")
data class InvalidRoomState(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_INVALID_USERNAME")
data class InvalidUsername(val error: String) : ErrorResponse

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

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

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_MISSING_PARAM")
data class MissingParam(val error: String) : ErrorResponse

A required parameter was missing from the request.

Link copied to clipboard
@Serializable
@SerialName(value = "M_MISSING_TOKEN")
data class MissingToken(val error: String) : ErrorResponse

No access token was specified for the request.

Link copied to clipboard
@Serializable
@SerialName(value = "M_NOT_FOUND")
data class NotFound(val error: String) : ErrorResponse

No resource was found for this request.

Link copied to clipboard
@Serializable
@SerialName(value = "M_NOT_JSON")
data class NotJson(val error: String) : ErrorResponse

Request did not contain valid JSON.

Link copied to clipboard
@Serializable
@SerialName(value = "M_RESOURCE_LIMIT_EXCEEDED")
data class ResourceLimitExceeded(val error: String, 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
@SerialName(value = "M_ROOM_IN_USE")
data class RoomInUse(val error: String) : ErrorResponse

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

Link copied to clipboard
object Serializer : KSerializer<ErrorResponse>
Link copied to clipboard
@Serializable
@SerialName(value = "M_SERVER_NOT_TRUSTED")
data class ServerNotTrusted(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_THREEPID_MEDIUM_NOT_SUPPORTED")
data class ThirdPartyMediumNotSupported(val error: String) : ErrorResponse

The homeserver does not support adding a third party identifier of the given medium.

Link copied to clipboard
@Serializable
@SerialName(value = "M_THREEPID_AUTH_FAILED")
data class ThirdPIdAuthFailed(val error: String) : ErrorResponse

Authentication could not be performed on the third party identifier.

Link copied to clipboard
@Serializable
@SerialName(value = "M_THREEPID_DENIED")
data class ThirdPIdDenied(val error: String) : 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
@SerialName(value = "M_THREEPID_IN_USE")
data class ThirdPIdInUse(val error: String) : 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
@SerialName(value = "M_THREEPID_NOT_FOUND")
data class ThirdPIdNotFound(val error: String) : 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
@SerialName(value = "M_TOO_LARGE")
data class TooLarge(val error: String) : ErrorResponse

The request or entity was too large.

Link copied to clipboard
@Serializable
@SerialName(value = "M_UNABLE_TO_AUTHORISE_JOIN")
data class UnableToAuthoriseJoin(val error: String) : ErrorResponse
Link copied to clipboard
@Serializable
@SerialName(value = "M_UNABLE_TO_GRANT_JOIN")
data class UnableToGrantJoin(val error: String) : ErrorResponse
Link copied to clipboard
@Serializable
@SerialName(value = "M_UNAUTHORIZED")
data class Unauthorized(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_UNKNOWN")
data class Unknown(val error: String) : ErrorResponse

An unknown error has occurred.

Link copied to clipboard
@Serializable
@SerialName(value = "M_UNKNOWN_TOKEN")
data class UnknownToken(val error: String, val softLogout: Boolean = false) : ErrorResponse

The access token specified was not recognised.

Link copied to clipboard
@Serializable
@SerialName(value = "M_UNRECOGNIZED")
data class Unrecognized(val error: String) : ErrorResponse

The server did not understand the request.

Link copied to clipboard
@Serializable
@SerialName(value = "M_UNSUPPORTED_ROOM_VERSION")
data class UnsupportedRoomVersion(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_USER_DEACTIVATED")
data class UserDeactivated(val error: String) : 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
@SerialName(value = "M_USER_IN_USE")
data class UserInUse(val error: String) : ErrorResponse

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

Link copied to clipboard
@Serializable
@SerialName(value = "M_USER_LOCKED")
data class UserLocked(val error: String, val softLogout: Boolean = false) : ErrorResponse

The account has been locked and cannot be used at this time.

Link copied to clipboard
@Serializable
@SerialName(value = "M_USER_SUSPENDED")
data class UserSuspended(val error: String) : ErrorResponse

The account has been suspended and can only be used for limited actions at this time.

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

Properties

Link copied to clipboard
abstract val error: String