Wp-calypso: Domain picker: add error handling

Created on 24 Jul 2020  路  3Comments  路  Source: Automattic/wp-calypso

We should support not only the happy path when the user searches for a domain.

Steps to reproduce

  1. Starting at URL: /new
  2. advance to domain step and search for _wordpress_
  3. The results area will continue to display loading state

What I expected

Some error message saying the query is invalid in this case.
Screenshot 2020-07-24 at 14 02 35

Probably we need to support also other cases where the message would be more generic.

Related?: https://github.com/Automattic/wp-calypso/issues/43503

Domains [Goal] New Onboarding [Pri] Normal [Type] Bug

Most helpful comment

See https://github.com/Automattic/wp-calypso/blob/f65f304c99e5266956592e7e159b0dbf81b6d08f/client/lib/domains/registration/availability-messages.js for some of the possible error states (some are actual errors, some are just "not-so-happy-cases"). You definitely don't need to implement all of them but MAINTENANCE, PURCHASES_DISABLED, EMPTY_RESULTS, DISALLOWED, FORBIDDEN_SUBDOMAIN, FORBIDDEN, INVALID_*, RESTRICTED all seem like good candidates 馃槵

All 3 comments

See https://github.com/Automattic/wp-calypso/blob/f65f304c99e5266956592e7e159b0dbf81b6d08f/client/lib/domains/registration/availability-messages.js for some of the possible error states (some are actual errors, some are just "not-so-happy-cases"). You definitely don't need to implement all of them but MAINTENANCE, PURCHASES_DISABLED, EMPTY_RESULTS, DISALLOWED, FORBIDDEN_SUBDOMAIN, FORBIDDEN, INVALID_*, RESTRICTED all seem like good candidates 馃槵

See https://github.com/Automattic/wp-calypso/blob/f65f304c99e5266956592e7e159b0dbf81b6d08f/client/lib/domains/registration/availability-messages.js for some of the possible error states (some are actual errors, some are just "not-so-happy-cases"). You definitely don't need to implement all of them but MAINTENANCE, PURCHASES_DISABLED, EMPTY_RESULTS, DISALLOWED, FORBIDDEN_SUBDOMAIN, FORBIDDEN, INVALID_*, RESTRICTED all seem like good candidates 馃槵

Take note that the error states are for related to the domain availability checking which is for issue https://github.com/Automattic/wp-calypso/issues/41220.

Was this page helpful?
0 / 5 - 0 ratings