From fae6bb0b81c4fa5dfd1749905bb04c8a306b106f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 15 Oct 2022 13:30:38 +0300 Subject: [PATCH] Add M_UNRECOGNIZED variable --- error.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/error.go b/error.go index 0503ad4f..2fc0dc25 100644 --- a/error.go +++ b/error.go @@ -24,6 +24,8 @@ import ( var ( // Forbidden access, e.g. joining a room without permission, failed login. MForbidden = RespError{ErrCode: "M_FORBIDDEN"} + // Unrecognized request, e.g. the endpoint does not exist or is not implemented. + MUnrecognized = RespError{ErrCode: "M_UNRECOGNIZED"} // The access token specified was not recognised. MUnknownToken = RespError{ErrCode: "M_UNKNOWN_TOKEN"} // No access token was specified for the request. @@ -47,7 +49,7 @@ var ( MRoomInUse = RespError{ErrCode: "M_ROOM_IN_USE"} // The state change requested cannot be performed, such as attempting to unban a user who is not banned. MBadState = RespError{ErrCode: "M_BAD_STATE"} - // The request or entity was too large. + // The request or entity was too large. MTooLarge = RespError{ErrCode: "M_TOO_LARGE"} // The resource being requested is reserved by an application service, or the application service making the request has not created the resource. MExclusive = RespError{ErrCode: "M_EXCLUSIVE"}