fix(auth): add error_tracking_read OAuth2 scope for error-tracking commands#46
Draft
platinummonkey wants to merge 1 commit intomainfrom
Draft
fix(auth): add error_tracking_read OAuth2 scope for error-tracking commands#46platinummonkey wants to merge 1 commit intomainfrom
platinummonkey wants to merge 1 commit intomainfrom
Conversation
…mmands Add the `error_tracking_read` OAuth2 scope to the default scopes list to enable error-tracking commands when using OAuth2 authentication. Changes: - Add `error_tracking_read` to DefaultScopes() in pkg/auth/types/types.go:103 - Update test expectations in pkg/auth/types/types_test.go:176 - Document the scope in docs/OAUTH2.md:227 - Add OAuth2 troubleshooting section in docs/TROUBLESHOOTING.md:109 - Update error-tracking command help text with auth notes The scope is documented in Datadog's API reference: https://docs.datadoghq.com/api/latest/scopes/ Note: There may be edge cases where Datadog's OAuth2 authorization endpoint rejects this scope (e.g., for certain org configurations or DCR limitations). Added comprehensive troubleshooting documentation with API key workaround. Closes #45 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Collaborator
Author
|
Note: this is blocked until this route is properly included in OAuth scopes in the backend. |
📊 Test Coverage ReportThreshold: 80% ✅ Coverage by Package📈 Coverage Status: ✅ PASSED - Coverage meets minimum threshold Updated for commit 157a4e3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
error_tracking_readOAuth2 scope to enable error-tracking commands when using OAuth2 authentication. Resolves authentication issues where error-tracking commands would fail with 401 Unauthorized when using OAuth2.Changes
error_tracking_readto DefaultScopes()Background
The error-tracking commands (
pup error-tracking issues search|get) were implemented without adding the required OAuth2 scope. According to Datadog's API documentation, theerror_tracking_readscope is required for Error Tracking API endpoints.Scope Availability Note
While the
error_tracking_readscope is documented and valid, there may be edge cases where Datadog's OAuth2 authorization endpoint rejects it during login (e.g., for DCR clients or certain org configurations). The PR includes comprehensive troubleshooting documentation with an API key authentication workaround.Testing
All existing tests pass. The new scope is validated in
TestDefaultScopes().Related Issues
Closes #45
🤖 Generated with Claude Code