Bug #222

Error: Key has expired. Contact key owner for access renewal

Added by ajurna 10 months ago. Updated 9 months ago.

Status:Closed Start date:Jul 30, 2012
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:- Spent time: -
Target version:2.1.0
Detected Version:2.0.5 Python Version:2.7.2

Description

seems that we dont support this properly. so this needs to be managed.

Associated revisions

Revision 982:18b4702f3bd3
Added by diabeteman 9 months ago

patched eveapi for better error handling fixes #222

History

#1 Updated by ajurna 10 months ago

did a basic fix for this in the api handler lib. r913 makes it so that when pulling a char list it just returns an empty list instead of failing. this should avoid interrupting any other functionality.

#2 Updated by ajurna 10 months ago

  • Priority changed from High to Normal
  • % Done changed from 0 to 10

so the question i have now is where are we checking for dead and invalid api keys. because this expired key is still listed in my active keys list. i think we should have a dedicated task for this.

#3 Updated by virusmoere 10 months ago

After updating the instance with your change:

Traceback (most recent call last):

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/core/handlers/base.py", line 89, in get_response
    response = middleware_method(request)

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/middleware/common.py", line 67, in process_request
    if (not urlresolvers.is_valid_path(request.path_info, urlconf) and

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/core/urlresolvers.py", line 531, in is_valid_path
    resolve(path, urlconf)

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/core/urlresolvers.py", line 420, in resolve
    return get_resolver(urlconf).resolve(path)

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/core/urlresolvers.py", line 298, in resolve
    for pattern in self.url_patterns:

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/core/urlresolvers.py", line 328, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/core/urlresolvers.py", line 323, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)

  File "/usr/local/lib/python2.6/dist-packages/Django-1.4-py2.6.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)

  File "/usr/local/lib/python2.6/dist-packages/ecm-2.0.5.2.dev-py2.6.egg/ecm/urls.py", line 25, in <module>
    from ecm.views.account.forms import PasswordChangeForm, PasswordResetForm, PasswordSetForm

  File "/usr/local/lib/python2.6/dist-packages/ecm-2.0.5.2.dev-py2.6.egg/ecm/views/account/forms.py", line 35, in <module>
    from ecm.apps.common import api

  File "/usr/local/lib/python2.6/dist-packages/ecm-2.0.5.2.dev-py2.6.egg/ecm/apps/common/api.py", line 118

    try:

   ^

IndentationError: unexpected indent

#4 Updated by Drezil 10 months ago

the indention-error should be fixed. dunno about the rest.

#5 Updated by diabeteman 10 months ago

Hey guys,

i'm really NOT ok with this "catch all" thing.

The handling of such an error should be done in the calling modules like i did here : source:ecm/apps/hr/tasks/users.py#L43

#6 Updated by ajurna 10 months ago

well the reason i didn't is that this should be getting caught elsewhere. otherwise we have alot of validation code spread out and that's bad practice. so the whole common/api system should handle it in the background rather than in the tasks that are accessing them.

#7 Updated by diabeteman 9 months ago

  • Target version set to 2.1.0

#8 Updated by diabeteman 9 months ago

  • Status changed from New to Resolved
  • % Done changed from 10 to 100

Applied in changeset 18b4702f3bd3.

#9 Updated by diabeteman 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF