jamesnetherton commented on code in PR #648:
URL: 
https://github.com/apache/camel-quarkus-examples/pull/648#discussion_r4719556641


##########
a2a-openai/orchestrator/src/main/java/org/acme/a2a/openai/ticket/triage/orchestrator/TicketTriageRoutes.java:
##########
@@ -71,8 +59,20 @@ public void configure() {
 
         
from("platform-http:/tickets?httpMethodRestrict=POST&consumes=application/json&produces=application/json")
                 .routeId("ticket-triage")
+                // A ticket that cannot be parsed or fails validation is 
rejected with HTTP 400. The details are logged,
+                // the caller only gets a generic message so that nothing 
about the internals leaks out. Only these
+                // steps are the caller's fault: JSON errors later in the 
route are server side problems (HTTP 502).
+                .doTry()
                 .unmarshal().json(Ticket.class)
                 .process(support::validateTicket)
+                .endDoTry()
+                .doCatch(Exception.class)

Review Comment:
   I'll leave it as-is for now. I might end up reverting back to the original 
code with the updated Jackson 3 exception type.
   
   For now this gets us green builds across main & camel-main.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to