Repository navigation
feat(exception): offer the upstream status of an engine error to PHP consumers - #40
Merged
Merged
Conversation
… getUpstreamStatus() [*] FlowableApiException keeps the HTTP status the engine answered with, unmapped, for every exception built from an engine response; a transport error and the inherited constructor yield null. Messages, headers, the status mapping and the factory signatures are unchanged. Part of #39 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rror or CLI output [*] An engine answering 503 shows in the flowable.upstream_error log entry and through getUpstreamStatus() only. The correlation id is replaced before any substring check and the debug trace is left out, so neither can falsify the result. Part of #39 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rs section of the README [*] Part of #39 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FlowableApiException::getUpstreamStatus(): ?intoffers PHP consumers the HTTP status the Flowable engine answered with. Since 0.14.0 (#18) that status is no longer part of the message, so a consumer that decides by it (e.g. a fallback when the engine is down) had nothing to read.nullfor a transport error (unreachable()) and for the inherited constructor, so an engine answering 504 can be told from a timeout.flowable.upstream_errorlog entry, the audit entries and the signatures offromUpstreamStatus()andunreachable()are unchanged. No observable behaviour changes.Tests
tests/Exception/FlowableApiExceptionTest.php,tests/Client/FlowableClientErrorTest.php: the status through the factories and through the real client, including transport errors and errors while reading a body. They fail against 0.16.0.tests/Http/UpstreamErrorTest.php: an engine 503 shows in no HTTP response, MCP error, CLI output, health output or audit failure context. The correlation id is replaced before substring checks and the debug trace is left out. Counter-check done locally: with the status written into the message these tests fail.Release
CHANGELOG block
0.17.0;composer.jsonrequirements unchanged. Tag0.17.0follows on the merge commit.Closes #39
🤖 Generated with Claude Code