Project

Profile

Help

Task #2271

closed

Plan Structured Exception Storage

Added by bmbouter over 7 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 10
Quarter:

Description

In 2.y and currently on 3.0-dev branches, Exception objects are stored inconsistently. It is backed by two json fields. One is for storing non-fatal exceptions, and another is for storing a single fatal exception field.

When saving an exception, the exception type will give you different types of information. Here are the current behaviors:

Exception -- you'll get the entire traceback as one string. It includes the Exception name and message, but it's not structured which means the API can't structure it easily either. The traceback is logged once in the logs.

PulpException -- same as exception

PulpCodedException -- you'll save a dictionary with the following keys: 'code', 'description', 'data', and 'sub_errors'. What you won't save is the type (besides the 'code') or message (maybe that's 'description'?) or the traceback in any way. The traceback is logged once in the logs, but regularly we have users who are not the admins and don't know where the logs are try to find that one line. Also sub_errors allows for recursive nesting.

With ^ in mind here are some questions:

  • Do we want a dictionary in all exception cases with 'traceback' and 'message' as keys?
  • Should 'code' also be there but be None when not set?
  • Do we want to keep sub_errors and the recursive storage?
  • Should we structure tracebacks better or is this a client side issue?
Actions #1

Updated by semyers over 7 years ago

As this relates to the REST API, http://www.django-rest-framework.org/api-guide/exceptions/ has some guidance on how to make sure what we come up with is well-represented in the API.

Actions #2

Updated by mhrivnak over 7 years ago

  • Description updated (diff)
Actions #3

Updated by mhrivnak over 7 years ago

  • Groomed changed from No to Yes
Actions #4

Updated by mhrivnak over 7 years ago

  • Sprint/Milestone set to 27
Actions #5

Updated by jortel@redhat.com over 7 years ago

  • Sprint/Milestone changed from 27 to 28
Actions #6

Updated by dkliban@redhat.com over 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com

Added by dkliban@redhat.com over 7 years ago

Revision 9a37b213 | View on GitHub

Replaces PulpCodedException with PulpException

The new PulpException should be used as a base class for each Pulp coded exception.

closes #2271 https://pulp.plan.io/issues/2271

Added by dkliban@redhat.com over 7 years ago

Revision 9a37b213 | View on GitHub

Replaces PulpCodedException with PulpException

The new PulpException should be used as a base class for each Pulp coded exception.

closes #2271 https://pulp.plan.io/issues/2271

Actions #7

Updated by dkliban@redhat.com over 7 years ago

  • Status changed from ASSIGNED to MODIFIED
  • % Done changed from 0 to 100
Actions #8

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 10
Actions #9

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (28)
Actions #10

Updated by daviddavis about 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #11

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #12

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF