Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>com.getaxonflow</groupId>
<artifactId>axonflow-sdk</artifactId>
<version>6.1.0</version>
<version>8.5.1</version>
</dependency>
</dependencies>

Expand Down
16 changes: 14 additions & 2 deletions examples/basic/src/main/java/com/getaxonflow/examples/Basic.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,20 @@ private static void proxyLLMCallStep(AxonFlow client, String clientId) {
System.out.printf(" Success: %s%n", response.isSuccess());
System.out.printf(" Blocked: %s%n", response.isBlocked());
} catch (PolicyViolationException e) {
// Policy block is a valid outcome — community policies can match
// the demo query depending on configuration.
// SDK <= 8.5.1 misclassifies 403 auth rejections as policy
// violations: every agent error body carries a literal
// "blocked":false key, which trips handleErrorResponse's
// body.contains("blocked") heuristic. Until the library fix
// ships, treat tenant mismatch as the auth failure it is —
// otherwise a wrong AXONFLOW_CLIENT_ID (it must match the
// user token's tenant) sails through the smoke with exit 0.
if (e.getMessage() != null && e.getMessage().contains("Tenant mismatch")) {
System.err.println("proxyLLMCall failed (auth): " + e.getMessage()
+ " — AXONFLOW_CLIENT_ID must match the user token's tenant");
System.exit(1);
}
// Genuine policy block is a valid outcome — community policies
// can match the demo query depending on configuration.
System.out.printf(" Blocked by policy: %s%n", e.getMessage());
} catch (AuthenticationException | ConnectionException e) {
// These are real failures: bad creds or stack down. Fail loud.
Expand Down
2 changes: 1 addition & 1 deletion examples/explain-decision/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>com.getaxonflow</groupId>
<artifactId>axonflow-sdk</artifactId>
<version>8.5.0</version>
<version>8.5.1</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion examples/list-decisions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>com.getaxonflow</groupId>
<artifactId>axonflow-sdk</artifactId>
<version>8.5.0</version>
<version>8.5.1</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion examples/wcp-retry-idempotency/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>com.getaxonflow</groupId>
<artifactId>axonflow-sdk</artifactId>
<version>8.5.0</version>
<version>8.5.1</version>
</dependency>
</dependencies>

Expand Down
Loading