Wulf / create-rust-app

Set up a modern rust+react web app by running one command.

Home Page:https://create-rust-app.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[enhancement] Status code for /activate and /register could probably be more specific

AnthonyMichaelTDM opened this issue · comments

return Err((400, "Already registered."));

  • Here, a 409 response code might be more specific, as this only happens when the client is attempting to create a duplicate user.

return Err((200, "Already activated!"));

  • Wouldn't a 303 status code, be more appropriate here, as the client should be redirected to .../login after POSTing to .../activate when their account is already?

On second thought, this isn't really a major issue, there's nothing inherently wrong with the current status codes they just aren't necessarily as specific as they could be, closing this issue