AOSSIE-Org / AOSSIE-Org/Agora-Blockchain
[Enhancement]: error handling in fetchFileFromIPFS.ts
- Ngôn ngữ chính
- JavaScript
- Star
- 97
- Fork
- 199
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Issue Description ✍️
## 📌 Issue Summary
On error, it only logs and returns undefined, so callers can't detect failures.
No HTTP status check; non-200 responses are treated as success.
JSON parsing errors aren't handled separately.
CandidateDescription.tsx sets undefined when the call fails.
## 💡 Suggestions
Check response.ok and throw on non-2xx.
Handle JSON parsing errors separately.
Throw meaningful errors so callers can handle them.
Remove the console.log.
### Record
- [x] I have synced all my node versions as mentioned in the project
- [x] I am using the same version of npm as is the project
- [x] My current branch is in sync with the development branch
- [x] I want to work on this issue
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.