ipfs / ipfs/kubo

Provide sentinel errors in the HTTP API

Open
#7,307 3 comments 0 reactions 0 assignees View on GitHub
help wanted kind/enhancement P3 status/ready topic/rpc-api
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

Matching errors against concrete types would be nice vs. fragile error string matching, e.g.,

```
if err.Error() == "'from' cid was not recursively pinned already" { ...
```

Or, maybe using more fine grained error codes would be even better. I believe the above error will come with a code: `ErrNormal` or similar.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.