Chuyển tới nội dung chính

Credit budget form errors (error_code → UI copy)

Form modals on Credit Budgets show API failures in a red banner (Error! / エラー! + message). The message is always taken from frontend i18n, keyed by detail.error_code. Backend detail.message is not shown.

ItemLocation
Mappersrc/components/credit-budgets/formErrors.ts
Bannersrc/components/credit-budgets/FormErrorBanner.tsx
Copy ENsrc/i18n/locales/en/creditBudgets.json → formErrors.*
Copy JAsrc/i18n/locales/ja/creditBudgets.json → formErrors.*
API codesdocs/rate-limit/rate-limit-fe-api.md (HTTP error table)

Unknown / missing error_code → that modal’s formErrors.<context>.fallback.

Toggle enable, remove confirm, and list load failures still use toasts (or inline page text), not this banner.


English​

Display shape​

Error! <mapped FE sentence>

Set / Edit organization budget (orgBudget)​

error_codeWhen (API)Banner text (EN)
LIMIT_BELOW_USAGENew org limit < org used this monthThis limit cannot be lower than credits already used this month.
ALLOCATION_EXCEEDEDNew org limit < sum of member limitsThis limit cannot be lower than credits already allocated to members.
QUOTA_ALREADY_EXISTSPOST when org already has a budgetThis organization already has a credit budget.
QUOTA_NOT_FOUNDOrg / budget missingOrganization budget was not found.
(other / none)Network, 5xx, unmapped codeCould not save the organization budget.

Assign quotas (assign)​

error_codeWhen (API)Banner text (EN)
ORG_BUDGET_NOT_SETOrg has no SysAdmin budgetOrganization budget is not set. Ask a system admin to set it first.
ALLOCATION_EXCEEDEDSelected × limit > org remainingNot enough organization budget left for the selected members and limit.
USER_NOT_IN_ORGOne or more users not in orgOne or more selected members are not in this organization.
LIMIT_BELOW_USAGELimit < a selected member’s usedLimit cannot be lower than credits a selected member has already used.
QUOTA_ALREADY_EXISTSMember already has a quota rowOne or more selected members already have a quota.
(other / none)Could not assign member quotas.

Set / Edit member quota (userQuota)​

error_codeWhen (API)Banner text (EN)
ORG_BUDGET_NOT_SETOrg has no SysAdmin budgetOrganization budget is not set. Ask a system admin to set it first.
LIMIT_BELOW_USAGENew limit < that member’s usedThis limit cannot be lower than credits this member has already used.
ALLOCATION_EXCEEDEDNew limit would exceed org remainingThis limit exceeds the organization budget remaining.
USER_NOT_IN_ORGUser not in orgThis member is not in the organization.
QUOTA_ALREADY_EXISTSSet when quota already existsThis member already has a credit quota.
QUOTA_NOT_FOUNDEdit target missingMember quota was not found.
(other / none)Could not save the member quota.

Not mapped in form banners​

These codes belong to chat / enforcement or non-form actions: ORG_QUOTA_DISABLED, QUOTA_DISABLED, NO_QUOTA_ASSIGNED, USER_QUOTA_EXCEEDED, ORG_REQUIRED.


日本語​

表示形式​

エラー! <フロントエンドが決めた文言>

API の detail.message はそのまま出しません。error_code から creditBudgets.formErrors.* を引きます。未知のコードやコードなしは各モーダルの fallback です。

組織予算の設定 / 編集(orgBudget)​

error_code発生条件(API)バナー文言(JA)
LIMIT_BELOW_USAGE新しい組織上限 < 今月の使用量この上限は、今月すでに使用したクレジットより低く設定できません。
ALLOCATION_EXCEEDED新しい組織上限 < メンバー割当合計この上限は、メンバーに割り当て済みのクレジット合計より低く設定できません。
QUOTA_ALREADY_EXISTSすでに予算がある組織へ POSTこの組織にはすでにクレジット予算があります。
QUOTA_NOT_FOUND組織 / 予算が存在しない組織のクレジット予算が見つかりませんでした。
(その他 / なし)通信エラー、5xx、未マップ組織のクレジット予算を保存できませんでした。

枠の一括割り当て(assign)​

error_code発生条件(API)バナー文言(JA)
ORG_BUDGET_NOT_SET組織予算未設定組織の予算が未設定です。先にシステム管理者に設定を依頼してください。
ALLOCATION_EXCEEDED選択人数 × 上限 > 組織の残り選択したメンバーと上限に対して、組織の残り予算が不足しています。
USER_NOT_IN_ORG組織外メンバーを含む選択したメンバーの一部がこの組織に所属していません。
LIMIT_BELOW_USAGE上限 < 選択メンバーの使用量上限は、選択したメンバーがすでに使用したクレジットより低く設定できません。
QUOTA_ALREADY_EXISTSすでに枠があるメンバー選択したメンバーの一部にはすでに枠が割り当てられています。
(その他 / なし)メンバー枠を割り当てできませんでした。

メンバー枠の設定 / 編集(userQuota)​

error_code発生条件(API)バナー文言(JA)
ORG_BUDGET_NOT_SET組織予算未設定組織の予算が未設定です。先にシステム管理者に設定を依頼してください。
LIMIT_BELOW_USAGE新上限 < そのメンバーの使用量この上限は、このメンバーがすでに使用したクレジットより低く設定できません。
ALLOCATION_EXCEEDED組織の残り予算を超えるこの上限は、組織の残り予算を超えています。
USER_NOT_IN_ORG組織外ユーザーこのメンバーは組織に所属していません。
QUOTA_ALREADY_EXISTSすでに枠があるのに Setこのメンバーにはすでにクレジット枠があります。
QUOTA_NOT_FOUND編集対象がないメンバーのクレジット枠が見つかりませんでした。
(その他 / なし)メンバーのクレジット枠を保存できませんでした。

フォームバナーにマップしないコード​

チャット / 実行時制御やフォーム外操作向け: ORG_QUOTA_DISABLED、 QUOTA_DISABLED、NO_QUOTA_ASSIGNED、USER_QUOTA_EXCEEDED、ORG_REQUIRED。

有効/無効トグル、削除確認、一覧読込失敗は従来どおり トースト(またはページ内文言)です。


Changing copy​

  1. Edit matching keys under formErrors in both en and ja locale files.
  2. Keep this doc’s tables in sync.
  3. tests/localeParity.test.ts fails if a key exists in only one language.