Skip to content

Commit 8358a80

Browse files
authored
Merge pull request #135 from EventStore/new-subscription-errors
Display the reason when there is an error creating a competing consumer
2 parents f5e8d4b + 8975f27 commit 8358a80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/modules/competing/controllers/SubscriptionsNewCtrl.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ define(['./_module'], function (app) {
4747
msg.success("Subscription has been created");
4848
$state.go('^.list');
4949
}, function(response){
50-
msg.failure('Coudn\'t create new subscription because ' + response.statusText);
50+
var error = response.statusText;
51+
if(response.data && response.data.reason) {
52+
error = response.data.reason;
53+
}
54+
msg.failure('Coudn\'t create new subscription because ' + error);
5155
});
5256
};
5357

0 commit comments

Comments
 (0)