Election-Tech-Initiative / Election-Tech-Initiative/electionguard-api-python
Return 400 errors on deserialization failure
Đang mở
enhancement
good first issue
hacktoberfest
help wanted
- Ngôn ngữ chính
- Python
- Star
- 37
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## Feature Request
Until we have full Pydantic-compliant models (#98), we rely on custom deserialization in the routes, e.g.:
```python
ballots = [PlaintextBallot.from_json_object(ballot) for ballot in request.ballots]
```
If this deserialization fails, however, it manifests as an opaque `500` error to the client. We should capture deserialization errors and send a `400` with as much information as possible.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.