ipfs/kubo

Provide sentinel errors in the HTTP API

Open

#7,307 建立於 2020年5月12日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Go (2,725 fork)batch import
P3help wantedkind/enhancementstatus/readytopic/rpc-api

倉庫指標

Star
 (13,906 star)
PR 合併指標
 (平均合併 4天 2小時) (30 天內合併 28 個 PR)

描述

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.

貢獻者指南