Skip to content

Convert enforcement AskTimeoutException to 503 instead of 500#2441

Merged
thjaeckle merged 1 commit into
eclipse-ditto:masterfrom
boschglobal:fix/enforcer-internal-error
May 12, 2026
Merged

Convert enforcement AskTimeoutException to 503 instead of 500#2441
thjaeckle merged 1 commit into
eclipse-ditto:masterfrom
boschglobal:fix/enforcer-internal-error

Conversation

@alstanchev
Copy link
Copy Markdown
Contributor

During rolling restarts, AskTimeoutException from the enforcer child was wrapped as DittoInternalErrorException (HTTP 500). This is misleading — the timeout is transient and clients should retry.

Introduce EnforcementTimeoutException (HTTP 503) and convert AskTimeoutException to it in getEnforcementExceptionAsRuntimeException. Also unwrap CompletionException wrappers from async chains before checking the exception type.

Fixes #2439

During rolling restarts, AskTimeoutException from the enforcer child
was wrapped as DittoInternalErrorException (HTTP 500). This is
misleading — the timeout is transient and clients should retry.

Introduce EnforcementTimeoutException (HTTP 503) and convert
AskTimeoutException to it in getEnforcementExceptionAsRuntimeException.
Also unwrap CompletionException wrappers from async chains before
checking the exception type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
@alstanchev alstanchev force-pushed the fix/enforcer-internal-error branch from 079fc41 to a66ef60 Compare May 11, 2026 19:13
@alstanchev alstanchev added this to the 3.9.1 milestone May 11, 2026
@alstanchev alstanchev added the bug label May 11, 2026
@alstanchev alstanchev self-assigned this May 11, 2026
Copy link
Copy Markdown
Member

@thjaeckle thjaeckle left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thx @alstanchev

We can also add this to 3.9.0

@thjaeckle thjaeckle modified the milestones: 3.9.1, 3.9.0 May 12, 2026
@thjaeckle thjaeckle merged commit 9010634 into eclipse-ditto:master May 12, 2026
3 checks passed
thjaeckle added a commit to beyonnex-io/ditto that referenced this pull request May 12, 2026
Adds PRs eclipse-ditto#2440 (JFR CPU optimisations), eclipse-ditto#2441 / eclipse-ditto#2439 (AskTimeoutException
to 503), eclipse-ditto#2442 (Helm OIDC issuers), eclipse-ditto#2444 / eclipse-ditto#2443 (ssl-config fix), eclipse-ditto#2445
(MongoDB X509 auth), eclipse-ditto#2446 (stackless 4xx exceptions) and eclipse-ditto#2447
(configurable SSE backpressure) to the release notes and blogpost.

Renames the announcement post to 2026-05-13.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Convert enforcement AskTimeoutException to HTTP 503 instead of 500

2 participants