sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
290 stars 27 forks source link

Login fails with cryptic error message if the email is wrong #72

Closed farcaller closed 7 years ago

farcaller commented 7 years ago

error message: discord - Login error: Login error: (null)

debug logs:

2017-02-09 10:14:49 bitlbee: {"email":"xxx","password":"yyy"}
2017-02-09 10:14:49 bitlbee: HTTP response headers:
2017-02-09 10:14:49 bitlbee: HTTP/1.1 400 BAD REQUEST
2017-02-09 10:14:49 bitlbee: Date: Thu, 09 Feb 2017 10:14:49 GMT
2017-02-09 10:14:49 bitlbee: Content-Type: application/json
2017-02-09 10:14:49 bitlbee: Content-Length: 36
2017-02-09 10:14:49 bitlbee: Connection: keep-alive
2017-02-09 10:14:49 bitlbee: Set-Cookie: zzz
2017-02-09 10:14:49 bitlbee: Strict-Transport-Security: max-age=31536000; includeSubDomains
2017-02-09 10:14:49 bitlbee: Via: 1.1 google
2017-02-09 10:14:49 bitlbee: Alt-Svc: clear
2017-02-09 10:14:49 bitlbee: Server: cloudflare-nginx
2017-02-09 10:14:49 bitlbee: CF-RAY: 32e68e8148730f57-FRA

2017-02-09 10:14:49 bitlbee: Finishing HTTP request with status: 400 BAD REQUEST
2017-02-09 10:14:49 bitlbee: [10:14:49] <<< ((null)) discord_http_login_cb [400] 36
2017-02-09 10:14:49 bitlbee: {"email": ["Email does not exist."]}
sm00th commented 7 years ago

Discord servers can't find your email in their database. Are you sure username for discord account set to the right email including the '@xxx.xx' part?

zertap commented 7 years ago

I think he meant that the error message should be more clear about that.

sm00th commented 7 years ago

I'd love it to be more clear, but discord is not consistent in how it reports errors (sometimes it is "email" field, somethimes "message" or "error"), nor they have any docs on possible errors.

farcaller commented 7 years ago

I guess it's better try try a few keys, than to report (null) and force users to enable debug mode of bitlbee to figure what's happening, right?

sm00th commented 7 years ago

Sure, when get to it. I'm accepting pull requests btw.

Related issue: #65