Skip to content

Conversation

@HotSushi
Copy link
Contributor

Summary

Previously, ServiceFailureException from persistence layer timeouts was being
wrapped in AuthenticationFailedException, causing IOException during loadEntity
operations to return 401 Unauthorized instead of the correct 503 Service Unavailable.

This change allows ServiceFailureException to bubble up to IcebergExceptionMapper
which properly maps it to 503 Service Unavailable, while preserving the existing
behavior for other authentication exceptions.

  • Modified AuthenticatingAugmentor to catch ServiceFailureException separately
  • Added test case to verify ServiceFailureException bubbles up correctly
  • Other RuntimeExceptions still wrapped in AuthenticationFailedException for 401

Tests

✅ Added a unit test
./gradlew build succeeds

flyrain
flyrain previously approved these changes Sep 25, 2025
Copy link
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HotSushi for the change. +1 on more accurate HTTP return code.

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Sep 25, 2025
singhpk234
singhpk234 previously approved these changes Sep 25, 2025
@HotSushi HotSushi dismissed stale reviews from singhpk234 and flyrain via d87443d September 25, 2025 00:49
Copy link
Contributor

@adnanhemani adnanhemani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@singhpk234 singhpk234 closed this Sep 25, 2025
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Sep 25, 2025
@singhpk234 singhpk234 reopened this Sep 25, 2025
@github-project-automation github-project-automation bot moved this from Done to PRs In Progress in Basic Kanban Board Sep 25, 2025
@flyrain flyrain merged commit 53aa531 into apache:main Sep 25, 2025
21 of 28 checks passed
@github-project-automation github-project-automation bot moved this from PRs In Progress to Done in Basic Kanban Board Sep 25, 2025
@flyrain
Copy link
Contributor

flyrain commented Sep 25, 2025

Thanks @HotSushi for the fix! Thanks @singhpk234 @HonahX for the review.

snazy added a commit to snazy/polaris that referenced this pull request Nov 20, 2025
* Minio testcontainer: allow setting a specific region (apache#2664)

... to remove the need to derive it via the AWS-SDK default mechanism requiring a system property or environment variable.

* fix(deps): update dependency org.apache.commons:commons-lang3 to v3.19.0 (apache#2665)

* Doc: Add breaking changes section for 1.1 release (apache#2654)

* fix(deps): update dependency com.h2database:h2 to v2.4.240 (apache#2668)

* fix(auth): let ServiceFailureException bubble up for proper HTTP status mapping during auth (apache#2670)

* fix(deps): update immutables to v2.11.4 (apache#2679)

* fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v8 (apache#2669)

* chore(deps): update quay.io/keycloak/keycloak docker tag to v26.3.5 (apache#2681)

* Last merged commit 2c0bf58

---------

Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Prashant Singh <35593236+singhpk234@users.noreply.github.com>
Co-authored-by: Sushant Raikar <sushant.raikar+OSS@snowflake.com>
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.

6 participants