← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 956469] Re: Glance should ensure consistency in exception messages all the way to client

 

No response, Closing.

** Changed in: glance
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/956469

Title:
  Glance should ensure consistency in exception messages all the way to
  client

Status in OpenStack Image Registry and Delivery Service (Glance):
  Invalid

Bug description:
  There is a systemic problem with the way Glance handles exceptions
  passed from underlying API and backend code to its client. The current
  model goes something like this:

  1. Error happens.

  2. Catch it, and log it.

  3. Re-raise a different exception with no message, failing preserving
  either the message or traceback.

  4. Allow client to transform neutered exception into an even-more-
  generic HTTP status code.

  A perfect example of this is here:
  https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L303

  In that code, a very useful error message is logged with a very
  meaningful exception class, and then replace by a blank HTTPForbidden,
  which returns to the client as a 403 with no information.

  This has lead to many hours of wasted developer time on bugs like
  https://bugs.launchpad.net/glance/+bug/955744 and
  https://bugs.launchpad.net/glance/+bug/952618.

  This entire behavior needs to be re-thought and re-worked so that
  consumers of Glance's client can provide useful, meaningful
  experiences without spending hours digging through Glance's codebase.

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