fix: display friendly error message for password validation on signup (#5563)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Brian Fromm
2025-11-19 09:42:50 -07:00
committed by GitHub
parent a3b5584505
commit 6d5aa355e4
3 changed files with 13 additions and 1 deletions

View File

@@ -101,7 +101,11 @@ export async function signup(username: string, password: string) {
});
if (res.status !== 200) {
throw new StatusError(`${res.status} ${res.statusText}`, res.status);
const body = await res.text();
throw new StatusError(
body || `${res.status} ${res.statusText}`,
res.status
);
}
}