mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-05-10 16:44:47 +00:00
Send nosub in response to bad sub request.
This commit is contained in:
parent
bd830a4aab
commit
4fe0a0f858
1 changed files with 9 additions and 1 deletions
10
dddp/api.py
10
dddp/api.py
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue