sentry-netlify-build-plugin icon indicating copy to clipboard operation
sentry-netlify-build-plugin copied to clipboard

Error: SentryCLI failed to set commits

Open michaelmior opened this issue 2 years ago • 3 comments

Steps to Reproduce

  1. Created internal integration in Sentry.
  2. Added the Sentry integration via the Netlify UI with the org slug, repo slug, and auth token.
  3. Push a commit to the main branch.

Expected Result

Build would be successfully deployed and reported.

Actual Result

The deploy fails with the error below.

Error: SentryCLI failed to set commits. You likely need to set up a repository or repository integration.
Read more: https://docs.sentry.io/workflow/releases/?platform=python#install-repo-integration

michaelmior avatar Mar 31 '23 19:03 michaelmior

It turns out the mistake was mine. I missed a permission step in the docs and did not set the Read permission for Organization in the Sentry integration. I was able to figure it out by seeing that I get a 403 when running set-commits locally with the Sentry CLI.

However, I would argue that the plugin could provide a better error message here. It seems like it should be possible to specify the error is a Sentry API auth issue.

michaelmior avatar Mar 31 '23 19:03 michaelmior

Hrm, I'm getting that error and have Read set on Organization

razzeee avatar Apr 11 '23 10:04 razzeee

I'm getting that error and have Read set on Organization too

CristyTarantino avatar May 17 '23 14:05 CristyTarantino