1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-2435 Protocol | Enhancement | MW 0.33.0-rc16 (#1129)

This commit is contained in:
Evgenii Kozlov 2024-04-17 11:58:02 +02:00 committed by uburoiubu
parent 434f8833b1
commit cddf26d190
No known key found for this signature in database
GPG key ID: C8FB80E0A595FBB6
4 changed files with 57 additions and 44 deletions

View file

@ -1817,16 +1817,10 @@ class MiddlewareServiceImplementation @Inject constructor(
val error = response.error
if (error != null && error.code != Rpc.Space.InviteView.Response.Error.Code.NULL) {
when(error.code) {
Rpc.Space.InviteView.Response.Error.Code.NO_SUCH_SPACE -> {
throw SpaceInviteError.SpaceNotFound()
}
Rpc.Space.InviteView.Response.Error.Code.SPACE_IS_DELETED -> {
throw SpaceInviteError.SpaceDeleted()
}
Rpc.Space.InviteView.Response.Error.Code.INVITE_NOT_FOUND -> {
throw SpaceInviteError.InvalidInvite()
}
Rpc.Space.InviteView.Response.Error.Code.INVITE_BAD_SIGNATURE -> {
Rpc.Space.InviteView.Response.Error.Code.INVITE_BAD_CONTENT -> {
throw SpaceInviteError.InvalidInvite()
}
else -> {