stratumn / go-core

Stratumn's core utilities to create decentralized applications and networks
Apache License 2.0
0 stars 0 forks source link

http: map error code to status codes #467

Closed t-bast closed 6 years ago

t-bast commented 6 years ago

Use structured errors in http endpoints. Map to relevant http status codes.


This change is Reviewable

codecov[bot] commented 6 years ago

Codecov Report

Merging #467 into master will decrease coverage by <.01%. The diff coverage is 81.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #467      +/-   ##
==========================================
- Coverage   70.68%   70.67%   -0.01%     
==========================================
  Files          90       89       -1     
  Lines        5297     5286      -11     
==========================================
- Hits         3744     3736       -8     
+ Misses       1182     1180       -2     
+ Partials      371      370       -1
Impacted Files Coverage Δ
fossilizer/fossilizerhttp/metrics.go 6.25% <ø> (ø) :arrow_up:
jsonws/basic.go 63.15% <ø> (ø) :arrow_up:
jsonws/bufferedconn.go 64.44% <ø> (ø) :arrow_up:
jsonhttp/jsonhttp.go 79.45% <100%> (ø) :arrow_up:
tmstore/tmstore.go 67.74% <100%> (ø) :arrow_up:
store/storehttp/storehttp.go 82.94% <76.92%> (ø) :arrow_up:
fossilizer/fossilizerhttp/fossilizerhttp.go 80.45% <77.77%> (ø) :arrow_up:
store/storehttp/errors.go 80% <80%> (ø) :arrow_up:
jsonhttp/errors.go 81.25% <84.21%> (-9.08%) :arrow_down:
postgresstore/stmts.go 95.12% <0%> (ø) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aa65b2f...351612a. Read the comment docs.