Skip to content

[BUG] pup events search fails with 401 with OAuth login #85

Description

@noizwaves

Describe the bug

When using the OAuth authentication method, calls to pup events search will always fail with a 401 unauthorized error. However, when setting the DD_API_KEY and DD_APP_KEY method of authentication the command succeeds.

Note

pup events list does work with OAuth authentication.

To Reproduce

Steps to reproduce the behavior:

  1. DD_TOKEN_STORAGE=file pup auth login, accepting OAuth prompt
  2. DD_TOKEN_STORAGE=file pup events search --query="foobar"

Expected behavior

The command should succeed, printing the event search results to stdout. For example:

❯ DD_TOKEN_STORAGE=file pup events search --query="fooabr" | jq -r ".data | length"
100

Environment

  • OS: macOS
  • Pup version: pup version 0.18.0
  • Go version: 1.25
  • Authentication method: OAuth2

Installation method was direct binary download from GitHub release.

Command output

❯ DD_TOKEN_STORAGE=file pup events search
Error: failed to search events: 401 Unauthorized (status: 401)

Additional context

Thank you for writing this CLI!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions