Skip to content

Better errors for when secrets (POLICY_AUD, etc) are not set #81

Description

@nbolton

Depending on what isn't set, you get some mysterious errors that takes a while to figure out by trawling the server logs.

  • TEAM_DOMAIN not set -> 401 Authentication error
  • POLICY_AUD not set -> 500 error / [Auth] JWT validation failed: unexpected "aud" claim value
  • ACCOUNT_ID or API_KEY not set -> API error: 500 / Error: Failed to list databases: 404

Why not check if these are set before doing anything and show an error for each? e.g.

Error: TEAM_DOMAIN env/secret not set

Bonus: As well as the error, link to docs such as: https://developers.cloudflare.com/fundamentals/account/find-account-and-zone-ids/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions