Read the relay's refusal, not just the HTTP status
🔴 **A 409 is not always a taken handle, and this said it was.** The relay answers 409 for a taken handle, an already-registered email, AND — since flamenet-relay!11 — a handle too close to an existing one. Three problems with three different fixes, all reported as "that handle is already taken". Somebody whose EMAIL was already registered was told to pick a different handle. Doing so cannot work, and nothing anywhere would have told them why. That is a pre-existing bug, not something the new refusals introduced; adding a third meaning to 409 is what made it visible. 400 was worse. Every format refusal — a short passphrase, an unusable email address, a disallowed handle — became "the account service returned 400", which is not a sentence anybody can act on. The status is the transport's opinion. The `code` in the body is the relay's, and it has always been sent; nothing here ever read it. ⚠️ **Unknown codes still refuse.** A relay newer than the app is the normal case, so an unrecognised code falls back to the status rather than to success — an account the server never created would be a much worse failure than a vague message. ⚠️ **An unparseable body cannot throw.** A proxy returning HTML on a 409 must still be a refusal, not a crash. Five tests, proven able to fail: collapsing 409 back to a single meaning turns four of them red. All three Android suites pass. Pairs with flamenet-relay!11 and flamenet-messenger-ios!45.
This commit is contained in:
@@ -2624,6 +2624,23 @@ class MessengerViewModel(app: Application) : AndroidViewModel(app) {
|
||||
"Your session expired. Sign out and back in to keep going."
|
||||
|
||||
is AccountsClient.Failure.HandleTaken -> "That handle is already taken."
|
||||
// ⚠️ Each of these says what to DO. A refusal somebody cannot act on is
|
||||
// the same as no explanation: they retry the same thing and are refused
|
||||
// again. "Too similar" without "changing a digit won't help" sends
|
||||
// people round that loop deliberately.
|
||||
is AccountsClient.Failure.EmailTaken ->
|
||||
"An account with that email already exists. Try signing in instead."
|
||||
is AccountsClient.Failure.HandleConfusable ->
|
||||
"That handle looks too much like one that already exists. " +
|
||||
"Changing a digit won't help — try a different word."
|
||||
is AccountsClient.Failure.DisposableEmail ->
|
||||
"That email provider isn't accepted. Use an address you'll still be " +
|
||||
"able to read later — it's how you get back in."
|
||||
is AccountsClient.Failure.BadHandle ->
|
||||
"Handles can only contain lowercase letters and numbers."
|
||||
is AccountsClient.Failure.BadEmail -> "That doesn't look like a valid email address."
|
||||
is AccountsClient.Failure.WeakPassword ->
|
||||
"Your passphrase needs to be at least 8 characters."
|
||||
is AccountsClient.Failure.RateLimited -> "Too many attempts. Wait a few minutes."
|
||||
// ⚠️ Not the underlying message: at this layer it is a Java networking
|
||||
// string ("Failed to connect to /10.0.2.2:443"), which names an address
|
||||
|
||||
Reference in New Issue
Block a user