履歴インポートの設定を使用できません

GitHubHistoryConfigUnusable エラー(422 処理できないコンテンツ)の意味、含まれるフィールド、このエラーを返すエンドポイントについて説明します。

API は 422 Unprocessable Content の場合にこのエラーを返します。type は https://lingo.dev/docs/api/errors/github-history-config-unusable です。すべてのエラーに共通する構造については、エラーとステータスコードをご覧ください。

<repository> のデフォルトブランチに .lingo/config.json がないため、履歴から翻訳ファイルを特定できません。翻訳元ロケール、翻訳先ロケール、翻訳元ファイルのパターンを指定した設定ファイルを追加し、もう一度インポートしてください。設定ファイルの作成前のコミットも、この設定を使って読み込まれます。

フィールド #

レスポンス本文には、標準の type、status、title、detail メンバーに加えて、以下のフィールドが含まれます。detail のテキストはこれらのフィールドから生成されるため、クライアント側で独自のテキストを代わりに表示することもできます。

フィールド型
repositorystring
problem"missing" | "invalid"

例 #

json
{
  "detail": "<repository> has no .lingo/config.json on its default branch, so its history names no translation files. Add one with the source locale, target locales and source-file patterns, then import again. Commits made before it existed are read with it.",
  "repository": "<repository>",
  "problem": "missing",
  "type": "https://lingo.dev/docs/api/errors/github-history-config-unusable",
  "status": 422,
  "title": "History import configuration unusable"
}

このエラーを返すエンドポイント #

  • POST /v2/organizations/{orgId}/github/connections/{connectionId}/import-history