JavaWebStack / JavaWebStack/http-router
Throw proper exception when request parsing fails
- 主要言語
- Java
- スター
- 2
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Currently calling the .body method (or injecting it) and sending invalid content to the endpoint throws a generic java.text.ParseException or MapperWrongTypeException from abstract-data. The stacktrace is hard to debug since it doesn't contain any context (endpoint, invalid data, etc.)
Instead we should throw an exception that contains more context and can be properly handled in the exception handler and responded to.
1. Invalid request body throws a specific exception
2. The default exception handler, responds with 400
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start at the request parsing path used by the .body method or body injection, then trace how ParseException and MapperWrongTypeException reach the default exception handler. Add context to the request-body failure and verify that invalid bodies produce a specific exception and a 400 response.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100