Onyx-Protocol / Onyx

Onyx

Home Page:https://Onyx.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: accessing routes that don't exist yield CH000

jeffomatic opened this issue · comments

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"

what should the CHXXX code be?

Is CH404 too on the nose? That would communicate a lot to the user right off the bat.

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?

should we use CH006, which is what Not Found is right now?

SGTM

Resolved by #985.