Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

エラーレスポンス(モデル)を検討する #3

Open
sunakan opened this issue Dec 14, 2022 · 1 comment
Open

エラーレスポンス(モデル)を検討する #3

sunakan opened this issue Dec 14, 2022 · 1 comment

Comments

@sunakan
Copy link
Contributor

sunakan commented Dec 14, 2022

考え中

{
  "details": [
    {
      "message": "User.Nameが長すぎます(32文字以下にしてください)",
      "code": "0000-0001",
    }
  ],
  "status_code": 422,
  "request_id": "UULD or UUID v6,7,8"
}

バリデーションエラーのステータスコード

  • 422 統一で良さそう

参考

@sunakan
Copy link
Contributor Author

sunakan commented Dec 14, 2022

別途エラーコードが欲しいと思った

"class番号-エラー番号"

正直あまり番号管理はどうかとも思っているが、良い案が思いつかない
もしかしたら外すかも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant