Skip to content

Add Tracking IDs to all API Errors and Warnings #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2020
Merged

Conversation

cmlccie
Copy link
Collaborator

@cmlccie cmlccie commented Jul 8, 2020

The tracking ID is now prominently displayed in the printed output of all API errors and warnings, and it is available via the tracking_id attribute on caught ApiError exceptions and warnings.

Example:

ApiError: [401] Unauthorized - The request requires a valid access token set in the Authorization request header. [Tracking ID: ROUTER_5F05F384-D9E9-01BB-00FF-4B0C804F00FF]

I also added an inheritance hierarchy for warnings and ensured that all ApiError and ApiWarning objects have consistent attributes including the new tracking_id attribute.

cmlccie added 2 commits July 7, 2020 16:24
Add support for the Admin Audit Events API
Add the `trackingId` returned in Webex API responses to the library API errors and warnings.

Clean-up exception and warning inheritance to reduce code duplication and provide a consistent inheritance hierarchy.
@cmlccie cmlccie requested a review from sQu4rks July 8, 2020 16:34
@cmlccie cmlccie linked an issue Jul 8, 2020 that may be closed by this pull request
@cmlccie cmlccie modified the milestone: v1.x Jul 8, 2020
@cmlccie cmlccie self-assigned this Jul 8, 2020
@sQu4rks
Copy link
Contributor

sQu4rks commented Jul 9, 2020

Looks great to me! I'll merge.

Copy link
Contributor

@sQu4rks sQu4rks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me.

Copy link
Contributor

@sQu4rks sQu4rks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@sQu4rks sQu4rks merged commit 7c30a40 into v1.x Jul 9, 2020
@cmlccie cmlccie deleted the feature-112 branch July 9, 2020 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TrackingId to ApiError message.
2 participants