bug: accessing routes that don't exist yield CH000
jeffomatic opened this issue · comments
Jeff Lee commented
Accessing non-existent RPC routes yields a server error (CH000, 500 status code), when it should be 404, e.g.
app=cored buildtag=? processID=chain-jeff-chain.local-12535-e47e47ee636a3489f2e4 reqid=4c97ce4ccc6c7c2f7c8c at=api.go:272 t=2017-04-19T22:46:21.569480246Z status=500 chaincode=CH000 path=/non-existent-route error="missing policy on this route"
Tess Rinearson commented
what should the CHXXX code be?
Dominic Dagradi commented
Is CH404
too on the nose? That would communicate a lot to the user right off the bat.
Tess Rinearson commented
We don't use CH4XX
for anything (did you mean a 404 http status? In which case, I agree.) This question was more like... should we use CH006
, which is what Not Found is right now?
Jeff Lee commented
should we use CH006, which is what Not Found is right now?
SGTM
Tess Rinearson commented
Resolved by #985.