Closed Bug 673144 Opened 10 years ago Closed 10 years ago

Passing more information on BackendError

Categories

(Cloud Services :: Server: Registration, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tarek, Assigned: tarek)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

File "/usr/lib/python2.6/site-packages/services/auth/mozilla_sreg.py", line 182, in delete_user
    raise BackendError()

=> this need to pass the initial error

e.g. BackendError(str(error))
We need 

- the initial TB
- the back end server where the error happened
Summary: Passing the error when delete user fails → Passing more information on BackendError
from the meeting we had on the topic:

- BackendError will have a few optionals args:
  - retry_after
  - server
  
- base_app gets a get_infos() that is dumped in the error log
  get_infos() returns stuff like user info, and other app can complete/override it
Assignee: nobody → tarek
Status: NEW → ASSIGNED
Attachment #547827 - Flags: review?(telliott)
Attachment #547827 - Flags: review?(rmiller)
Duplicate of this bug: 630299
Comment on attachment 547827 [details] [diff] [review]
Adds the features discussed

Review of attachment 547827 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #547827 - Flags: review?(rmiller) → review+
Attachment #547827 - Flags: review?(telliott) → review+
Comment on attachment 547827 [details] [diff] [review]
Adds the features discussed

Driveby feedback:

>-        except BackendError:
>-            err = traceback.format_exc()
>-            hash = create_hash(err)
>+        except BackendError, err:

I recommend the Python 3.x syntax which is already available in Python 2.6:

  except BackendError as err

which is way more readable than the broken 2.x syntax.
Pushed at http://hg.mozilla.org/services/server-core/rev/24ebe923ae91
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Duplicate of this bug: 666775
Blocks: 676423
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.