mirror of https://github.com/apache/activemq.git
AMQ-5519: use the NOT_FOUND error condition when failing to find a DurableSubscription
https://issues.apache.org/jira/browse/AMQ-5519
This commit is contained in:
parent
5b7213eb82
commit
6466ae2bcf
|
@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.InvalidClientIDException;
|
||||
import javax.jms.InvalidDestinationException;
|
||||
import javax.jms.InvalidSelectorException;
|
||||
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
@ -1335,6 +1336,8 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
|
|||
Throwable exception = ((ExceptionResponse) response).getException();
|
||||
if (exception instanceof SecurityException) {
|
||||
sender.setCondition(new ErrorCondition(AmqpError.UNAUTHORIZED_ACCESS, exception.getMessage()));
|
||||
} else if (exception instanceof InvalidDestinationException){
|
||||
sender.setCondition(new ErrorCondition(AmqpError.NOT_FOUND, exception.getMessage()));
|
||||
} else {
|
||||
sender.setCondition(new ErrorCondition(AmqpError.INTERNAL_ERROR, exception.getMessage()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue