getsentry / sentry-cli

A command line utility to work with Sentry.
https://docs.sentry.io/cli/
BSD 3-Clause "New" or "Revised" License
898 stars 221 forks source link

sentry-cli says `error: organization not found` for invalid project name #1911

Closed PythonCoderAS closed 8 months ago

PythonCoderAS commented 8 months ago

Environment

What version of the CLI and what OS are you running?

sentry-cli 2.26.0 on MacOS

Steps to Reproduce

What you did?

sentry-cli issues list -a --project=fakeproject --org pythoncoderas

Expected Result

error: project not found

Actual Result

error: organization not found

Logs

  INFO    2024-01-23 08:44:35.809610 -05:00 Loaded config from /Users/User/.sentryclirc
  DEBUG   2024-01-23 08:44:35.809727 -05:00 sentry-cli version: 2.26.0, platform: "darwin", architecture: "arm64"
  INFO    2024-01-23 08:44:35.809746 -05:00 sentry-cli was invoked with the following command line: "sentry-cli" "issues" "list" "-a" "--project=fakeproject" "--org" "pythoncoderas" "--log-level=debug"
  DEBUG   2024-01-23 08:44:35.809907 -05:00 request GET https://sentry.io/api/0/projects/pythoncoderas/fakeproject/issues/?query=&cursor=
  DEBUG   2024-01-23 08:44:35.809916 -05:00 using token authentication
  DEBUG   2024-01-23 08:44:35.809928 -05:00 retry number 0, max retries: 0
  DEBUG   2024-01-23 08:44:35.867486 -05:00 > GET /api/0/projects/pythoncoderas/fakeproject/issues/?query=&cursor= HTTP/1.1
  DEBUG   2024-01-23 08:44:35.867502 -05:00 > Host: sentry.io
  DEBUG   2024-01-23 08:44:35.867506 -05:00 > Accept: */*
  DEBUG   2024-01-23 08:44:35.867510 -05:00 > Connection: TE
  DEBUG   2024-01-23 08:44:35.867513 -05:00 > TE: gzip
  DEBUG   2024-01-23 08:44:35.867516 -05:00 > User-Agent: sentry-cli/2.26.0
  DEBUG   2024-01-23 08:44:35.868522 -05:00 > Authorization: Bearer fe835b0e***
  DEBUG   2024-01-23 08:44:35.977718 -05:00 < HTTP/1.1 404 Not Found
  DEBUG   2024-01-23 08:44:35.977778 -05:00 < server: nginx
  DEBUG   2024-01-23 08:44:35.977793 -05:00 < date: Tue, 23 Jan 2024 13:44:35 GMT
  DEBUG   2024-01-23 08:44:35.977814 -05:00 < content-type: application/json
  DEBUG   2024-01-23 08:44:35.977824 -05:00 < Content-Length: 50
  DEBUG   2024-01-23 08:44:35.977842 -05:00 < allow: GET, PUT, DELETE, HEAD, OPTIONS
  DEBUG   2024-01-23 08:44:35.977852 -05:00 < access-control-allow-methods: GET, PUT, DELETE, HEAD, OPTIONS
  DEBUG   2024-01-23 08:44:35.977893 -05:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2024-01-23 08:44:35.977914 -05:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
  DEBUG   2024-01-23 08:44:35.977936 -05:00 < access-control-allow-origin: *
  DEBUG   2024-01-23 08:44:35.977946 -05:00 < x-sentry-rate-limit-remaining: 4
  DEBUG   2024-01-23 08:44:35.977995 -05:00 < x-sentry-rate-limit-limit: 5
  DEBUG   2024-01-23 08:44:35.978027 -05:00 < x-sentry-rate-limit-reset: 1706017476
  DEBUG   2024-01-23 08:44:35.978037 -05:00 < x-sentry-rate-limit-concurrentremaining: 24
  DEBUG   2024-01-23 08:44:35.978049 -05:00 < x-sentry-rate-limit-concurrentlimit: 25
  DEBUG   2024-01-23 08:44:35.978057 -05:00 < vary: Accept-Language, Cookie
  DEBUG   2024-01-23 08:44:35.978065 -05:00 < content-language: en
  DEBUG   2024-01-23 08:44:35.978112 -05:00 < x-frame-options: deny
  DEBUG   2024-01-23 08:44:35.978122 -05:00 < x-content-type-options: nosniff
  DEBUG   2024-01-23 08:44:35.978129 -05:00 < x-xss-protection: 1; mode=block
  DEBUG   2024-01-23 08:44:35.978162 -05:00 < content-security-policy: frame-src app.pendo.io demo.arcade.software js.stripe.com sentry.io; base-uri 'none'; frame-ancestors 'self' *.sentry.io; font-src * data:; default-src 'none'; media-src *; style-src 'unsafe-inline' *; img-src blob: data: *; connect-src 'self' *.algolia.net *.algolianet.com *.algolia.io sentry.io *.sentry.io s1.sentry-cdn.com o1.ingest.sentry.io api2.amplitude.com app.pendo.io data.pendo.io reload.getsentry.net t687h3m0nh65.statuspage.io sentry.zendesk.com ekr.zdassets.com maps.googleapis.com; script-src 'self' 'unsafe-inline' 'report-sample' 'unsafe-eval' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; object-src 'self'; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=f724a8a027db45f5b21507e7142ff78e&sentry_release=fd9b554414e4e45feb62a411312f528be997d71c
  DEBUG   2024-01-23 08:44:35.978180 -05:00 < x-envoy-attempt-count: 1
  DEBUG   2024-01-23 08:44:35.978187 -05:00 < x-envoy-upstream-service-time: 68
  DEBUG   2024-01-23 08:44:35.978196 -05:00 < x-served-by: getsentry-web-default-common-production-6499fb66b4-88r8r
  DEBUG   2024-01-23 08:44:35.978212 -05:00 < x-served-by: frontend-default-6f87467fcf-s7xxq
  DEBUG   2024-01-23 08:44:35.978222 -05:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2024-01-23 08:44:35.978230 -05:00 < via: 1.1 google
  DEBUG   2024-01-23 08:44:35.978239 -05:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  DEBUG   2024-01-23 08:44:35.978322 -05:00 response status: 404
error: organization not found
  DEBUG   2024-01-23 08:44:35.978489 -05:00 skipping update nagger because session is not attended
szokeasaurusrex commented 8 months ago

Indeed, this is a bug. I was able to reproduce it. Thank you for reporting, we will look into how we can fix it as soon as possible!