AOSSIE-Org / AOSSIE-Org/Agora-Blockchain
[Enhancement]: error handling in fetchFileFromIPFS.ts
- Lingua principale
- JavaScript
- Stelle
- 97
- Fork
- 199
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### 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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.