Skip to content

Commit 20e140c

Browse files
committed
add more information on queue error
1 parent da17700 commit 20e140c

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

OpenFlow/src/Messages/Message.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -594,11 +594,11 @@ export class Message {
594594
if (mq != null) {
595595
if (Config.amqp_force_consumer_has_update) {
596596
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.update)) {
597-
throw new Error("Unknown queue or access denied");
597+
throw new Error("Unknown queue or access denied, missing update permission on exchange object " + tuser.name);
598598
}
599599
} else if (Config.amqp_force_sender_has_invoke) {
600600
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.invoke)) {
601-
throw new Error("Unknown queue or access denied");
601+
throw new Error("Unknown queue or access denied, missing invoke permission on exchange object " + tuser.name);
602602
}
603603
}
604604
} else {
@@ -661,11 +661,11 @@ export class Message {
661661
if (mq != null) {
662662
if (Config.amqp_force_consumer_has_update) {
663663
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.update)) {
664-
throw new Error("Unknown queue or access denied");
664+
throw new Error("Unknown queue or access denied, missing update permission on users object " + tuser.name);
665665
}
666666
} else if (Config.amqp_force_sender_has_invoke) {
667667
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.invoke)) {
668-
throw new Error("Unknown queue or access denied");
668+
throw new Error("Unknown queue or access denied, missing invoke permission on users object " + tuser.name);
669669
}
670670
}
671671
allowed = true;
@@ -683,11 +683,11 @@ export class Message {
683683
if (mq != null) {
684684
if (Config.amqp_force_consumer_has_update) {
685685
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.update)) {
686-
throw new Error("Unknown queue or access denied");
686+
throw new Error("Unknown queue or access denied, missing update permission on queue object " + tuser.name);
687687
}
688688
} else if (Config.amqp_force_sender_has_invoke) {
689689
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.invoke)) {
690-
throw new Error("Unknown queue or access denied");
690+
throw new Error("Unknown queue or access denied, missing invoke permission on queue object " + tuser.name);
691691
}
692692
}
693693
allowed = true;
@@ -772,11 +772,11 @@ export class Message {
772772
if (mq != null) {
773773
if (Config.amqp_force_sender_has_invoke) {
774774
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.invoke)) {
775-
throw new Error("Unknown queue or access denied");
775+
throw new Error("Unknown queue or access denied, missing invoke permission on users object " + tuser.name);
776776
}
777777
} else {
778778
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.read)) {
779-
throw new Error("Unknown queue or access denied");
779+
throw new Error("Unknown queue or access denied, missing read permission on users object " + tuser.name);
780780
}
781781
}
782782
allowed = true;
@@ -794,11 +794,11 @@ export class Message {
794794
if (mq != null) {
795795
if (Config.amqp_force_sender_has_invoke) {
796796
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.invoke)) {
797-
throw new Error("Unknown queue or access denied");
797+
throw new Error("Unknown queue or access denied, missing invoke permission on queue object " + tuser.name);
798798
}
799799
} else {
800800
if (!DatabaseConnection.hasAuthorization(tuser, mq, Rights.read)) {
801-
throw new Error("Unknown queue or access denied");
801+
throw new Error("Unknown queue or access denied, missing read permission on queue object " + tuser.name);
802802
}
803803

804804
}

0 commit comments

Comments
 (0)