Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Uncaught exception for incorrect application name #60

Description

@bnaul

Makes sense that this would fail but it was a bit tricky to debug because of the error. Changing our STORMPATH_APPLICATION config variable led to the following error:

ERROR:cesium.Flask.flask_app:Exception on /login [POST]
Traceback (most recent call last):
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask_stormpath/views.py", line 129, in login
    account = User.from_login(form.login.data, form.password.data)
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask_stormpath/models.py", line 126, in from_login
    _user = current_app.stormpath_manager.application.authenticate_account(login, password).account
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/flask_stormpath/__init__.py", line 271, in application
    )[0]
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/stormpath/resources/base.py", line 450, in __getitem__
    return self.__dict__['items'][idx]
IndexError: list index out of range

Seems like this should be caught and reported in a nicer fashion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions