supertokens / supertokens/supertokens-python

200 HTTP code on error

Open
#467 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
148
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Why do you return 200 HTTP code on errors? For example: when you check the validity of an email, if email is invalid "Email is invalid", you return the code GeneralError + 200. This is not RESTfull and not convenient, because in other places you sometimes return 400.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing email validation and the HTTP response handling that returns GeneralError, then compare it with the other paths that return 400. Done means the project consistently uses appropriate HTTP status codes for validation and other errors, with tests covering the changed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.