home: capitalize the user-facing refusal lines (#1164)
'that GitHub account already signs in somewhere else' renders verbatim as a standalone status sentence — all seventeen refusals start properly now.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
6 files changed,
+17
−17
home/anchors.go+1 −1home/email.go+3 −3home/github.go+3 −3home/merge.go+4 −4home/oidc.go+3 −3home/siwa.go+3 −3
diff --git a/home/anchors.go b/home/anchors.go| index f814c10..23f072a 100644 |
| --- a/home/anchors.go |
| +++ b/home/anchors.go |
| @@ -86,7 +86,7 @@ func (s *Server) listAnchorsHandler(w http.ResponseWriter, r *http.Request) { |
| func (s *Server) deleteAnchorHandler(w http.ResponseWriter, r *http.Request) { |
| uid, ok := s.ceremonyUser(r) |
| if !ok { |
| - http.Error(w, "confirm it's you first", http.StatusUnauthorized) |
| + http.Error(w, "Confirm it's you first", http.StatusUnauthorized) |
| return |
| } |
| var deleted, last bool |
diff --git a/home/email.go b/home/email.go| index c1dfa50..4c57c79 100644 |
| --- a/home/email.go |
| +++ b/home/email.go |
| @@ -185,14 +185,14 @@ func (s *Server) emailVerify(w http.ResponseWriter, r *http.Request) { |
| if req.Link { |
| uid, ok := s.ceremonyUser(r) |
| if !ok { |
| - http.Error(w, "confirm it's you first", http.StatusUnauthorized) |
| + http.Error(w, "Confirm it's you first", http.StatusUnauthorized) |
| return |
| } |
| linkUID = uid |
| } |
| index := s.emailIndex(req.Email) |
| if len(req.Code) != 6 || !s.emailCodes.redeem(index, req.Code, time.Now()) { |
| - http.Error(w, "that code didn't work", http.StatusUnauthorized) |
| + http.Error(w, "That code didn't work", http.StatusUnauthorized) |
| return |
| } |
| @@ -204,7 +204,7 @@ func (s *Server) emailVerify(w http.ResponseWriter, r *http.Request) { |
| return |
| } |
| if conflict { |
| - http.Error(w, "that address already signs in somewhere else", http.StatusConflict) |
| + http.Error(w, "That address already signs in somewhere else", http.StatusConflict) |
| return |
| } |
| writeJSON(w, http.StatusOK, map[string]any{"linked": true}) |
diff --git a/home/github.go b/home/github.go| index b5fd7e4..50b6ce8 100644 |
| --- a/home/github.go |
| +++ b/home/github.go |
| @@ -119,7 +119,7 @@ func (s *Server) githubVerify(w http.ResponseWriter, r *http.Request) { |
| } |
| sub, err := s.github.resolveSub(r.Context(), req.Code) |
| if err != nil { |
| - http.Error(w, "that sign-in couldn't be confirmed", http.StatusUnauthorized) |
| + http.Error(w, "That sign-in couldn't be confirmed", http.StatusUnauthorized) |
| return |
| } |
| subHash := s.github.subHash(sub) |
| @@ -127,7 +127,7 @@ func (s *Server) githubVerify(w http.ResponseWriter, r *http.Request) { |
| if req.Link { |
| uid, ok := s.ceremonyUser(r) |
| if !ok { |
| - http.Error(w, "confirm it's you first", http.StatusUnauthorized) |
| + http.Error(w, "Confirm it's you first", http.StatusUnauthorized) |
| return |
| } |
| conflict, err := s.store.insertOidcAnchor(uid, "github", subHash) |
| @@ -136,7 +136,7 @@ func (s *Server) githubVerify(w http.ResponseWriter, r *http.Request) { |
| return |
| } |
| if conflict { |
| - http.Error(w, "that GitHub account already signs in somewhere else", http.StatusConflict) |
| + http.Error(w, "That GitHub account already signs in somewhere else", http.StatusConflict) |
| return |
| } |
| writeJSON(w, http.StatusOK, map[string]any{"linked": true}) |
diff --git a/home/merge.go b/home/merge.go| index 4da7e8b..c5b4b65 100644 |
| --- a/home/merge.go |
| +++ b/home/merge.go |
| @@ -49,7 +49,7 @@ func (s *Server) mergeAccountHandler(w http.ResponseWriter, r *http.Request) { |
| // The survivor's OWN fresh proof — and it must be for the bearer's |
| // account, or it's someone else's ceremony riding this session. |
| if proofUID, ok := s.ceremonyUser(r); !ok || proofUID != survivor { |
| - http.Error(w, "confirm it's you first", http.StatusUnauthorized) |
| + http.Error(w, "Confirm it's you first", http.StatusUnauthorized) |
| return |
| } |
| var body struct { |
| @@ -61,7 +61,7 @@ func (s *Server) mergeAccountHandler(w http.ResponseWriter, r *http.Request) { |
| } |
| absorbed, ok := s.keys.ceremonyUser(body.AbsorbProof) |
| if !ok { |
| - http.Error(w, "confirm the other account too", http.StatusUnauthorized) |
| + http.Error(w, "Confirm the other account too", http.StatusUnauthorized) |
| return |
| } |
| if absorbed == survivor { |
| @@ -75,14 +75,14 @@ func (s *Server) mergeAccountHandler(w http.ResponseWriter, r *http.Request) { |
| http.Error(w, "db error", http.StatusInternalServerError) |
| return |
| } else if found { |
| - http.Error(w, "that account still holds a backup — move the spaces over first", http.StatusConflict) |
| + http.Error(w, "That account still holds a backup — move the spaces over first", http.StatusConflict) |
| return |
| } |
| moved, err := s.store.mergeAccounts(survivor, absorbed) |
| if errors.Is(err, errAbsorbedHasBlob) { |
| // The store's belt caught a blob written between the check above and |
| // the merge. |
| - http.Error(w, "that account still holds a backup — move the spaces over first", http.StatusConflict) |
| + http.Error(w, "That account still holds a backup — move the spaces over first", http.StatusConflict) |
| return |
| } |
| if err != nil { |
diff --git a/home/oidc.go b/home/oidc.go| index 410b576..74f197f 100644 |
| --- a/home/oidc.go |
| +++ b/home/oidc.go |
| @@ -309,7 +309,7 @@ func (s *Server) oidcVerify(w http.ResponseWriter, r *http.Request) { |
| } |
| sub, err := verifyIDToken(p.jwks, req.IdentityToken, p.checkIssuer, p.clientIDs, req.Nonce, time.Now()) |
| if err != nil { |
| - http.Error(w, "that sign-in couldn't be confirmed", http.StatusUnauthorized) |
| + http.Error(w, "That sign-in couldn't be confirmed", http.StatusUnauthorized) |
| return |
| } |
| subHash := p.subHash(sub) |
| @@ -317,7 +317,7 @@ func (s *Server) oidcVerify(w http.ResponseWriter, r *http.Request) { |
| if req.Link { |
| uid, ok := s.ceremonyUser(r) |
| if !ok { |
| - http.Error(w, "confirm it's you first", http.StatusUnauthorized) |
| + http.Error(w, "Confirm it's you first", http.StatusUnauthorized) |
| return |
| } |
| conflict, err := s.store.insertOidcAnchor(uid, p.name, subHash) |
| @@ -326,7 +326,7 @@ func (s *Server) oidcVerify(w http.ResponseWriter, r *http.Request) { |
| return |
| } |
| if conflict { |
| - http.Error(w, "that "+p.display+" account already signs in somewhere else", http.StatusConflict) |
| + http.Error(w, "That "+p.display+" account already signs in somewhere else", http.StatusConflict) |
| return |
| } |
| writeJSON(w, http.StatusOK, map[string]any{"linked": true}) |
diff --git a/home/siwa.go b/home/siwa.go| index 3a825e2..cba7857 100644 |
| --- a/home/siwa.go |
| +++ b/home/siwa.go |
| @@ -95,7 +95,7 @@ func (s *Server) siwaVerify(w http.ResponseWriter, r *http.Request) { |
| } |
| sub, err := verifySiwaToken(s.siwa, req.IdentityToken, s.siwaClientIDs, req.Nonce, time.Now()) |
| if err != nil { |
| - http.Error(w, "that sign-in couldn't be confirmed", http.StatusUnauthorized) |
| + http.Error(w, "That sign-in couldn't be confirmed", http.StatusUnauthorized) |
| return |
| } |
| subHash := s.siwaSubHash(sub) |
| @@ -103,7 +103,7 @@ func (s *Server) siwaVerify(w http.ResponseWriter, r *http.Request) { |
| if req.Link { |
| uid, ok := s.ceremonyUser(r) |
| if !ok { |
| - http.Error(w, "confirm it's you first", http.StatusUnauthorized) |
| + http.Error(w, "Confirm it's you first", http.StatusUnauthorized) |
| return |
| } |
| conflict, err := s.store.insertSiwaAnchor(uid, subHash) |
| @@ -112,7 +112,7 @@ func (s *Server) siwaVerify(w http.ResponseWriter, r *http.Request) { |
| return |
| } |
| if conflict { |
| - http.Error(w, "that Apple ID already signs in somewhere else", http.StatusConflict) |
| + http.Error(w, "That Apple ID already signs in somewhere else", http.StatusConflict) |
| return |
| } |
| writeJSON(w, http.StatusOK, map[string]any{"linked": true}) |