ipfs/kubo

Provide sentinel errors in the HTTP API

Open

#7,307 opened on 2020年5月12日

GitHub で見る
 (3 comments) (0 reactions) (0 assignees)Go (2,725 forks)batch import
P3help wantedkind/enhancementstatus/readytopic/rpc-api

Repository metrics

Stars
 (13,906 stars)
PR merge metrics
 (平均マージ 4d 2h) (30d で 28 merged PRs)

説明

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.

コントリビューターガイド