-
Notifications
You must be signed in to change notification settings - Fork 29
Labels
Description
Describe the bug
I can't access the error-tracking command when logged in via oauth. Claude's telling me it's a DCR thing, which sounds plausible to me given how much of a cluster DCR is but I have no idea.
To Reproduce
Steps to reproduce the behavior:
- Login via oauth. Verify account has
error_tracking_readoauth scope - pup error-tracking issue search
- See 401 unauthorized
Expected behavior
It works
Environment
- OS: mac...something. not the newest one, the one before it
- Pup version:
pup versionjust saysdev, also probably another bug - Go version: 1.25.0
- Authentication method: oauth
Claude Slop
1. Add error_tracking_read to DefaultScopes() in pkg/auth/types/types.go
// Usage
"usage_read",
+ // Error Tracking
+ "error_tracking_read",
}2. Build pup
go build -o $(go env GOPATH)/bin/pup .3. Clear existing credentials and re-register
pup auth logout
pup auth login4. Observe the error
The OAuth authorize URL is constructed with the scope parameter including error_tracking_read:
https://app.datadoghq.com/oauth2/v1/authorize?...&scope=dashboards_read+...+usage_read+error_tracking_read&...
Datadog's authorize endpoint immediately redirects back with:
Error: OAuth error: invalid_scope -
No browser consent page is shown.
5. Confirm the endpoint expects this scope (from the OpenAPI spec)
In .generator/schemas/v2/openapi.yaml, the SearchIssues endpoint declares:
/api/v2/error-tracking/issues/search:
post:
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- error_tracking_readBoth auth methods are listed — API key+App key OR OAuth2 with error_tracking_read.
Reactions are currently unavailable