Repository navigation
Localize user-facing error messages; move developer details to the log - #99
Merged
Merged
Conversation
CodedError descriptions were developer text ("NativeAppTemplateAPIError::NoData",
"<message> [Status: 500]") shown to the user in English. What the user sees
is now localized (en + ja), with the same wording as Android:
- NATIVEAPPTEMPLATE-2001 without the API's error_message: "Something went
wrong while communicating with the server. Please try again later."
- 2001 with error_message: the message as is, without the " [Status: nnn]"
suffix
- Developer-only errors (1001, 2002-2008, 4001-4004): "An unexpected error
occurred."
Codes and codedDescription's "[CODE] description" format are unchanged.
Status codes, field names and underlying errors move to the new
CodedError.debugDescription; Failure logs and URLSession.apiResponse log it
(error.debugCodedDescription). Sign-up no longer shows "UNKNOWN" for a
failure without error_message. AGENTS.md's localization rule is updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5hZEFqXhBsUQwSWsgR6eH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User-facing
CodedErrortext was developer text in English (NativeAppTemplateAPIError::NoData,<message> [Status: 500],EntityAdapterError::InvalidOrMissingAttributes). It is now localized (en + ja), worded the same as the paid template and MyTurnTag iOS/Android; developer details go to the log.requestFailedwithouterror_messageerror_message[Status: nnn]EntityAdapterError2006–2008, 4001–4004[CODE] descriptionformat are unchanged; no flow changes. The generic strings contain no rename-target nouns.CodedError.debugDescriptionkeeps status code, API message, field name, underlying error;Error.debugCodedDescriptionreturns it. AllFailurelogs use it, andURLSession.apiResponselogs failed and unreadable responses (Failure.request).error_message; it now shows the coded generic text.NATIVEAPPTEMPLATE-nnnncodes stay untranslated. CHANGELOG updated.Verification
make lint: 0 violations, 0 files need formatting.xcrun xcstringstool syncagainst the build's .stringsdata: both new keys present, every key hasjatranslated.-testLanguage ja), a temporary uncommitted test against the local nativeapptemplateapi and a local HTTP server, checkingMessage(error:).message:[NATIVEAPPTEMPLATE-2001] メールアドレスまたはパスワードが正しくありません。もう一度お試しください。(log hasStatus: 401)[NATIVEAPPTEMPLATE-2001] 見つかりませんでした。[NATIVEAPPTEMPLATE-2001] サーバーとの通信中に問題が発生しました。しばらくしてからもう一度お試しください。[NATIVEAPPTEMPLATE-2002] 予期しないエラーが発生しました。[NATIVEAPPTEMPLATE-4002] 予期しないエラーが発生しました。🤖 Generated with Claude Code
https://claude.ai/code/session_01K5hZEFqXhBsUQwSWsgR6eH