[
https://issues.apache.org/jira/browse/QPIDJMS-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085466#comment-18085466
]
ASF GitHub Bot commented on QPIDJMS-616:
----------------------------------------
gemmellr commented on code in PR #55:
URL: https://github.com/apache/qpid-jms/pull/55#discussion_r3340466667
##########
qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSupport.java:
##########
@@ -207,6 +207,18 @@ public static String extractErrorMessage(ErrorCondition
errorCondition) {
if (condition != null) {
message = message + " [condition = " + condition + "]";
}
+
+ try {
+ Map<?, ?> info = errorCondition.getInfo();
+ String messageWithInfo = message;
+ if (info != null && !info.isEmpty()) {
+ messageWithInfo = message + " [info = " + info + "]";
+ }
+ return messageWithInfo;
Review Comment:
I wouldnt expect that, but its up to the peer to decide what they put in
there so its impossible to say what might be in there. Typically nothing, hence
whey no client I know of thus far does whats proposed.
> ProviderException losses additional error info
> ----------------------------------------------
>
> Key: QPIDJMS-616
> URL: https://issues.apache.org/jira/browse/QPIDJMS-616
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 2.9.0
> Reporter: Karthik V
> Priority: Major
> Attachments: image-2025-11-07-13-43-16-346.png
>
>
> Dear Experts,
> When a ProviderException is created in AmqpSupport.java
> ([here),|https://github.com/apache/qpid-jms/blob/a5d9869808c7a4dbbbd108d238b7241d57b90c76/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSupport.java#L181]
> the curicial additional details about the error is lost, which otherwise
> would help identify the root cause of the issue on the client side.
>
> h4. Example :
> We work with Solace as the message broker, and with this there are many
> situations where the ErrorCondition looks like below
> {code:java}
> Rejected{error=Error{condition=amqp:not-allowed, description='SMF AD ack
> response error', info={solace.response_code=400,
> solace.response_text=Document Is Too Large}}}
> {code}
> But as the
> [extractErrorMessage|https://github.com/apache/qpid-jms/blob/a5d9869808c7a4dbbbd108d238b7241d57b90c76/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSupport.java#L199]
> does not also consider the {{_info}} of {{ErrorCondition}}, this information
> is lost in the exception and all we get is :
> {code:java}
> Caused by: org.apache.qpid.jms.provider.ProviderException: SMF AD ack
> response error [condition = amqp:not-allowed]
> {code}
> While the {{SMF AD ack response error [condition = amqp:not-allowed]}} is a
> generic message for a many error situations.
> It would be great to have this information. I am also willing to contribute
> here, as I dont have any clue of the design and code base, any guidance here
> would also help me.
> Thanks & Best Regards,
> Karthik
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]