Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

DuplicateLogin is not thrown for duplicate logins registered with registerUser #3

Closed
nurpax opened this Issue · 1 comment

1 participant

Janne Hellsten
Janne Hellsten
Owner

According to Snap.Snaplet.Auth, createUser (called by registerUser) may throw a DuplicateLogin exception if the login already exists in the database. The same should also apply to registerUser (which calls createUser and doesn't catch exceptions).

This is not what's happening though. Instead, this is what we get:

A web handler threw an exception. Details:
user error (SQLite3 returned ErrorConstraint while attempting to perform finalize.)

This can be reproduced by registering the same user twice using the snap default project (but using the snaplet-sqlite-simple backend).

I think it's definitely worthwhile to handle duplicate logins. It's a common error case that needs to be handled in the web UI.

OTOH, it looks like the Json auth backend does handle duplicate logins.

Janne Hellsten
Owner

Will be fixed in snap-0.10 & latest snaplet-sqlite-simple

Janne Hellsten nurpax closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.