← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1607107] [NEW] Unauthorized exception causes missing exception kwargs (programmer error)

 

Public bug reported:

I created the following class in keystone/exception.py:

class AccountLocked(Unauthorized):
    message_format = _("The account is locked for user: %(user_id)s")

And would raise the exception if a user account was locked:
raise exception.AccountLocked(user_id=user_id)

However when doing so, the following error would get logged:
missing exception kwargs (programmer error)

This seems to be a product of:
https://github.com/openstack/keystone/blob/master/keystone/exception.py#L61-L67

A few of us spent time on this in IRC.  For more content you can view that conversation here:
http://eavesdrop.openstack.org/irclogs/%23openstack-keystone/%23openstack-keystone.2016-07-27.log.html#t2016-07-27T14:49:24

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1607107

Title:
  Unauthorized exception causes missing exception kwargs (programmer
  error)

Status in OpenStack Identity (keystone):
  New

Bug description:
  I created the following class in keystone/exception.py:

  class AccountLocked(Unauthorized):
      message_format = _("The account is locked for user: %(user_id)s")

  And would raise the exception if a user account was locked:
  raise exception.AccountLocked(user_id=user_id)

  However when doing so, the following error would get logged:
  missing exception kwargs (programmer error)

  This seems to be a product of:
  https://github.com/openstack/keystone/blob/master/keystone/exception.py#L61-L67

  A few of us spent time on this in IRC.  For more content you can view that conversation here:
  http://eavesdrop.openstack.org/irclogs/%23openstack-keystone/%23openstack-keystone.2016-07-27.log.html#t2016-07-27T14:49:24

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1607107/+subscriptions


Follow ups