Skip to content

[Enhancement]: error handling in fetchFileFromIPFS.ts #222

@PranjaliBhardwaj

Description

@PranjaliBhardwaj

Is there an existing issue for this?

  • 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

  • I have synced all my node versions as mentioned in the project
  • I am using the same version of npm as is the project
  • My current branch is in sync with the development branch
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions