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

Closed
nurpax opened this Issue Sep 24, 2012 · 1 comment

Projects

None yet

1 participant

@nurpax
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.

@nurpax
Owner

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

@nurpax nurpax closed this Oct 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment