Symptom
On a zh-CN console, submitting /_console/register with an uninvited email on a stock boot (audience posture invite_only) shows this verbatim under the Chinese form:
Self-registration is closed on this environment (audience posture invite_only). Ask an administrator for an invitation.
The text is English and exposes the internal term "audience posture invite_only" to an end user.
Mechanism
The server answers 403 with a stable code, {"code":"SELF_REGISTRATION_CLOSED", ...}. The same door can also answer EMAIL_DOMAIN_NOT_ALLOWED under the email_domain posture.
apps/console/src/pages/auth/RegisterPage.tsx passes an error-code map to the form that localizes only USER_ALREADY_EXISTS and USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL (auth.register.errors.userExists). Every other code falls through to the server's message.
Reproduction
- Boot a stock objectstack showcase with an owner already created (objectui pin
dd3f7e1be356).
- Open
/_console/register signed out, with the console locale zh.
- Register
someone@example.com, a new email with no invitation.
- The refusal renders the English server message above.
Expected
SELF_REGISTRATION_CLOSED and EMAIL_DOMAIN_NOT_ALLOWED map to localized, end-user wording, for example 「本环境未开放自助注册,请联系管理员获取邀请」. The raw server message is reserved for codes the page does not know.
Symptom
On a zh-CN console, submitting
/_console/registerwith an uninvited email on a stock boot (audience postureinvite_only) shows this verbatim under the Chinese form:The text is English and exposes the internal term "audience posture invite_only" to an end user.
Mechanism
The server answers
403with a stable code,{"code":"SELF_REGISTRATION_CLOSED", ...}. The same door can also answerEMAIL_DOMAIN_NOT_ALLOWEDunder theemail_domainposture.apps/console/src/pages/auth/RegisterPage.tsxpasses an error-code map to the form that localizes onlyUSER_ALREADY_EXISTSandUSER_ALREADY_EXISTS_USE_ANOTHER_EMAIL(auth.register.errors.userExists). Every other code falls through to the server'smessage.Reproduction
dd3f7e1be356)./_console/registersigned out, with the console localezh.someone@example.com, a new email with no invitation.Expected
SELF_REGISTRATION_CLOSEDandEMAIL_DOMAIN_NOT_ALLOWEDmap to localized, end-user wording, for example 「本环境未开放自助注册,请联系管理员获取邀请」. The raw server message is reserved for codes the page does not know.