Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login: In realm-input, give "subdomain required" feedback, when servers should but don't #107

Open
chrisbobbe opened this issue May 23, 2023 · 1 comment
Labels
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

chrisbobbe commented May 23, 2023

In particular, this TODO on our getServerSettings request:

// TODO(#107): Perhaps detect realmless root domain, for more specific onboarding feedback.
//   See thread, and the zulip-mobile code and chat thread it links to:
//     https://github.com/zulip/zulip-flutter/pull/55#discussion_r1160267577

We could have code in our getServerSettings binding along the lines of that binding's counterpart in zulip-mobile:

  if (realm_name == null) {
    // […]
    //
    // This error copies the proper error that servers *sometimes* give when
    // the root domain is requested and there's no realm there. [1]
    // Specifically, servers give this when
    // `ROOT_DOMAIN_LANDING_PAGE = True`. That circumstance makes no
    // difference to mobile.
    //
    // [1] Observed empirically. For details, see
    //   https://chat.zulip.org/#narrow/stream/412-api-documentation/topic/.2Fserver_settings.3A.20.60realm_name.60.2C.20etc.2E/near/1332900 .
    throw new ApiError(400, { code: 'BAD_REQUEST', msg: 'Subdomain required', result: 'error' });
  }
@chrisbobbe
Copy link
Collaborator Author

We could have code in our getServerSettings binding along the lines of that binding's counterpart in zulip-mobile:

If taking this approach, we should probably wait for #37, so we have a counterpart for ApiError to throw.

@gnprice gnprice added this to the Launch milestone Jun 15, 2023
@gnprice gnprice modified the milestones: Launch, Post-launch Jul 31, 2024
@gnprice gnprice modified the milestones: M6: Post-launch, M7: Future Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants