0

I have made the register page.

And am now trying to login, to the finance app, however I get a "400 error". I also get a 302, which I'm unsure if is relevant.

DEBUG:cs50:SELECT * FROM users WHERE username = 'lemon'
INFO:werkzeug:192.168.192.6 - - [17/Nov/2019 13:56:31] "POST /login HTTP/1.0" 302 -
INFO:werkzeug:192.168.192.6 - - [17/Nov/2019 13:56:31] "GET / HTTP/1.0" 400 -
INFO:werkzeug:192.168.192.6 - - [17/Nov/2019 13:56:31] "GET /static/styles.css HTTP/1.0" 200 -
INFO:werkzeug:192.168.219.170 - - [17/Nov/2019 13:56:31] "GET /static/main.js HTTP/1.0" 200 -

I also have no idea, how to debug this.

Any advice/guidance would be appreciated

3
  • The 400 is coming from your index route. Have you completed that?
    – curiouskiwi
    Nov 17 '19 at 18:08
  • Why would a 400 error come up at the index even if i haven't completed it, because it still returns the function apology()? Nov 17 '19 at 18:47
  • see my answer below
    – curiouskiwi
    Nov 17 '19 at 22:05
1

By definition (from helpers.py):

def apology(message, code=400):

The apology function returns a 400. So if you haven't completed your index route yet, you should expect that it will return a 400.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .