chore: Add missing matrix error types as per spec

The full list of error codes is here:
https://spec.matrix.org/v1.1/client-server-api/#standard-error-response
This commit is contained in:
Sorunome 2021-12-07 21:10:59 +01:00
parent c7d182a0a7
commit 454e27239c
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 21 additions and 4 deletions

View File

@ -40,6 +40,23 @@ enum MatrixError {
M_MISSING_PARAM, M_MISSING_PARAM,
M_UNSUPPORTED_ROOM_VERSION, M_UNSUPPORTED_ROOM_VERSION,
M_UNRECOGNIZED, M_UNRECOGNIZED,
M_BAD_JSON,
M_NOT_JSON,
M_UNAUTHORIZED,
M_USER_DEACTIVATED,
M_INVALID_USERNAME,
M_ROOM_IN_USE,
M_INVALID_ROOM_STATE,
M_SERVER_NOT_TRUSTED,
M_INCOMPATIBLE_ROOM_VERSION,
M_BAD_STATE,
M_GUEST_ACCESS_FORBIDDEN,
M_CAPTCHA_NEEDED,
M_CAPTCHA_INVALID,
M_INVALID_PARAM,
M_EXCLUSIVE,
M_RESOURCE_LIMIT_EXCEEDED,
M_CANNOT_LEAVE_SERVER_NOTICE_ROOM,
} }
/// Represents a special response from the Homeserver for errors. /// Represents a special response from the Homeserver for errors.