Send nosub in response to bad sub request.

This commit is contained in:
Tyson Clugg 2015-05-18 12:37:09 +10:00
parent bd830a4aab
commit 4fe0a0f858

View file

@ -480,7 +480,15 @@ class DDP(APIMixin):
try:
pub = self._registry[pub_path(name)]
except KeyError:
this.error('Invalid publication name: %r' % name)
this.send_msg({
'msg': 'nosub',
'error': {
'error': 404,
'errorType': 'Meteor.Error',
'message': 'Subscription not found [404]',
'reason': 'Subscription not found',
},
})
return
obj, created = Subscription.objects.get_or_create(
connection_id=this.ws.connection.pk,