We should support not only the happy path when the user searches for a domain.
Some error message saying the query is invalid in this case.

Probably we need to support also other cases where the message would be more generic.
Related?: https://github.com/Automattic/wp-calypso/issues/43503
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.
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_*,RESTRICTEDall seem like good candidates 馃槵