Closed orhun closed 5 months ago
There are some cases where we return 500 instead of an appropriate HTTP status code. We should refactor them to make the API more idiomatic/conventional.
One example is from https://github.com/orhun/rustypaste/pull/258#discussion_r1517736731
https://github.com/orhun/rustypaste/blob/4987cfe5e55e5fc6165fd8392b3c2396f6d34437/src/server.rs#L954-L955
We should use 409 Conflict there instead of 500 internal server error.
409 Conflict
There are some cases where we return 500 instead of an appropriate HTTP status code. We should refactor them to make the API more idiomatic/conventional.
One example is from https://github.com/orhun/rustypaste/pull/258#discussion_r1517736731
https://github.com/orhun/rustypaste/blob/4987cfe5e55e5fc6165fd8392b3c2396f6d34437/src/server.rs#L954-L955
We should use
409 Conflict
there instead of 500 internal server error.