getsentry / sentry-cli

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

could not parse JSON response #2188

Open JoseVov opened 1 week ago

JoseVov commented 1 week ago

CLI Version

2.37.0

Operating System and Architecture

Operating System Version

14.1.1

Link to reproduction repository

No response

CLI Command

sentry-cli organizations list

Exact Reproduction Steps

Just call

sentry-cli organizations list

Expected Results

[{"id":1,"name":"xxx","slug":"xxxx","dateCreated":"2024-06-02T09:06:19.205496Z","status":{"id":"active","name":"active"},"avatar":{"avatarType":"","avatarUuid":null},"isEarlyAdopter":false,"require2FA":false,"isAcceptingEvents":true}]

Actual Results

error: could not parse JSON response
  caused by: invalid type: integer `1`, expected a string at line 1 column 9

Logs

If I made the api request manually with CURL

curl -H "Authorization: Bearer xxxxxx" https://sentry.xxxx.xxx/api/0/organizations/

It works as expected

szokeasaurusrex commented 1 week ago

@JoseVov I am unable to reproduce this behavior with Sentry SaaS. Are you using a self-hosted version of Sentry? If yes, which version of self-hosted Sentry are you running? And, did you notice this command breaking from one version of Sentry CLI to the next?