Error handling for wrong login, already logged out, etc.
Sometimes your access token already timed out but the client is still cached so it shows a disconnected state, but clicking "Logout" generates:
XHR POST https://matrix-client.matrix.org/_matrix/client/r0/logout
[HTTP/2 401 113ms]
M_UNKNOWN_TOKEN: MatrixError: [401] Invalid access token passed. (https://matrix-client.matrix.org/_matrix/client/r0/logout)
I guess for this one, matching Tea.error
on LoggedOut
msg should reset the client?
Or maybe on client start we can realize the token timed out.
Apparently "wrong login" is not handled either yet:
the login model must have an
error: error option
and when there's a result with an error it sets it, and if it's set the view, show a red thing with the error message.
Edited by Pierre de Lacroix