alan-turing-institute / trustchain

Trustworthy decentralised PKI
https://alan-turing-institute.github.io/trustchain/
Apache License 2.0
9 stars 4 forks source link

Mapping from errors to HTTP status codes #99

Open lukehare opened 1 year ago

lukehare commented 1 year ago

We need to decide on the correct HTTP status codes to return in various scenarios, i.e. INTERNAL_SERVER_ERROR vs STATUS_OK in cases where the trustchain root is invalid.

See here: https://github.com/alan-turing-institute/trustchain/blob/8e886872b393e58016f47b4ff612c253abc78fe6/trustchain-http/src/errors.rs#L55

lukehare commented 1 year ago

Also, see https://github.com/alan-turing-institute/trustchain/blob/f50b60c975f103bff0cc3fd42116e7adb7f13e39/trustchain-http/src/resolver.rs#L59