Placeholder as the Default Homeserver#101
Conversation
| default: | ||
| Logger.matrixClient.error("\(showError.localizedDescription)") | ||
| return "Something went wrong!" |
There was a problem hiding this comment.
I don't like this solution to make the errors prettier, since it default case catches too many errors under the unuseful "Something went wrong!" error. I'd rather have a harder to read error message than an opaque generic error like this.
For instance if you attempt to sign in and the username and password is incorrect this error is presented, the old error message was a bit harder to read, but it did say that the credentials were wrong.
Ideally, we should implement a nicely formatted error for all cases, but a simpler halfway solution is to return the original showError.localizedDescription if something goes wrong.
There was a problem hiding this comment.
I was not sure what would be preferable in that case since I don't know what the space of all possible errors looks like. We could in that instance just return showError.localizedDescription.
There was a problem hiding this comment.
Yes, that's very reasonable
Closes #68.