stormpath-django icon indicating copy to clipboard operation
stormpath-django copied to clipboard

API 400 errors don't become validation errors with user creation in admin

Open smcoll opened this issue 9 years ago • 4 comments

When creating a new StormpathUser in the admin's create view, if the password doesn't meet some requirement (try a too-short password like 'foo'), a 500 is raised, instead of a validation error in the form:

Error at /admin/django_stormpath/stormpathuser/add/ {u'status': 400, u'developerMessage': u'Account password minimum length not satisfied.', u'message': u'Account password minimum length not satisfied.', u'code': 2007, u'moreInfo': u'http://docs.stormpath.com/errors/2007'}

smcoll avatar Jul 14 '15 17:07 smcoll

Thanks! We're looking into this more now. Sorry for the delay.

rdegges avatar Aug 17 '15 16:08 rdegges

Ok, got this fixed, closing this out. Will be released once the other PRs are merged in.

@avojnovicDk did a great job of applying our full validation rules locally.

rdegges avatar Oct 01 '15 16:10 rdegges

I'm reopening this, as I still have to call validate_password in django_stormpath, once it gets released in the Stormpath Python SDK.

avojnovicDk avatar Oct 02 '15 13:10 avojnovicDk

@avojnovicDk wanna hop back onto this one now? The new Python stuff is updated.

rdegges avatar Nov 02 '15 23:11 rdegges