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:
parent
c7d182a0a7
commit
454e27239c
|
|
@ -1,17 +1,17 @@
|
||||||
/* MIT License
|
/* MIT License
|
||||||
*
|
*
|
||||||
* Copyright (C) 2019, 2020, 2021 Famedly GmbH
|
* Copyright (C) 2019, 2020, 2021 Famedly GmbH
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
* in the Software without restriction, including without limitation the rights
|
* in the Software without restriction, including without limitation the rights
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
* furnished to do so, subject to the following conditions:
|
* furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software.
|
* copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue