ipfs/kubo

Provide sentinel errors in the HTTP API

Open

#7 307 ouverte le 12 mai 2020

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)Go (2 725 forks)batch import
P3help wantedkind/enhancementstatus/readytopic/rpc-api

Métriques du dépôt

Stars
 (13 906 stars)
Métriques de merge PR
 (Merge moyen 4j 2h) (28 PRs mergées en 30 j)

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.

Guide contributeur