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.

贡献者指南