Skip to content

fix(maven): Include Sonatype's response body in API errors - #973

Merged
BYK merged 1 commit into
masterfrom
fix/maven-log-sonatype-error-body
Nov 19, 2026
Merged

BYK merged 1 commit into
masterfrom
fix/maven-log-sonatype-error-body

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

When a Sonatype staging API call fails, the maven target logs only the status line. The sentry-java@8.64.0 publish (getsentry/publish#10369) failed with Unable to close repository io.sentry--default-repository: 400, Bad Request, and the log doesn't say why Sonatype rejected the close.

The OSSRH Staging API puts a reason in the body of its 400 responses (for example Endpoint ... not supported. Please contact Central Support). This adds the trimmed body, cut to 1000 characters, to the errors for fetching, closing, and releasing the repository, so the next failure shows the reason.

via adam.brown.

--

View Session [Sentry]

Co-Authored-By: Adam Brown <adam.brown@sentry.io>
@BYK
BYK enabled auto-merge (squash) November 11, 2026 18:00
@BYK
BYK merged commit 2eb831c into master Nov 19, 2026
49 of 51 checks passed
@BYK
BYK deleted the fix/maven-log-sonatype-error-body branch November 19, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant