Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Catch error when user position is missing #59

Open
n2o opened this issue Aug 6, 2016 · 1 comment
Open

Catch error when user position is missing #59

n2o opened this issue Aug 6, 2016 · 1 comment
Assignees

Comments

@n2o
Copy link
Member

n2o commented Aug 6, 2016

When no player position is provided, this exception is raised:

127.0.0.1 - - [07/Aug/2016 01:36:50] "GET /api/status/niantic HTTP/1.1" 500 -
[2016-08-07 01:36:50,279] ERROR in app: Exception on /api/status/niantic [GET]
Traceback (most recent call last):
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask_cors/extension.py", line 188, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "app.py", line 163, in niantic_status
    response_dict = req.call()
  File "/home/n2o/.virtualenvs/pogo-cruncher/lib/python3.5/site-packages/pgoapi/pgoapi.py", line 171, in call
    raise NoPlayerPositionSetException()
pgoapi.exceptions.NoPlayerPositionSetException

I think this might be the same problem as the users from mods.de have.

@Wegi
Copy link
Member

Wegi commented Aug 7, 2016

Does the frontend make checks if position was put in?

Can't be the error from the mods.de guys, since they can log in and retrieve player information just fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants