メインコンテンツまでスキップ

エラーレスポンスの title をエラータイプごとに統一

エラーレスポンスの title を、type ごとに固定された文言に統一しました。同じ type であれば常に同じ title が返り、発生ごとに変わる情報は detail に含まれます。

破壊的変更​

title の文言が次のように変わりました。

ステータスtype変更前の title変更後の title
400https://feed.storyhub.studio/probs/validationArea Resolution FailedValidation Error
401https://feed.storyhub.studio/probs/authInvalid API KeyUnauthorized
403https://feed.storyhub.studio/probs/forbiddenContent Not ServedForbidden
404https://feed.storyhub.studio/probs/not-foundScenario Not FoundResource Not Found
404https://feed.storyhub.studio/probs/not-foundAlgorithm Not FoundResource Not Found

影響​

  • title の文字列で処理を分岐している場合は、type での判定に変更してください。type は変更されておらず、今後もエラータイプごとに不変です。title は表示用途のみを想定しています。
  • シナリオ未設定とアルゴリズム未検出はいずれも Resource Not Found になります。両者を区別する必要がある場合は detail、または送信したパラメーターで判断してください。
  • ステータスコードと type に変更はありません。

API が返す type と title の一覧は エラーハンドリング をご覧ください。