User not found returned by Azure web pubsub rest api
- Dominant language
- TypeScript
- Stars
- 147
- Forks
- 96
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 87
Description
We have created the webhooks for /connect and /connected in our server and we get those endpoints called when client connects to pubsub using websocket. We want to add the connected user to be added to certain pubsub groups and we do that in /connected webhook. The problem is sometimes the pubsub rest api throws User not found error when trying to add the user to a group.
If addition of user to the group fails, the server disconnects the current connection and the client reconnects. This is resulting in an endless loop of client reconnection since the pubsub rest api constantly throws "User not found" in /connected webhook.
Solutions we have tried:
Add user to group in /connect endpoint instead of /connected. Same error gets thrown.
Add connection to group instead of user. We are currently monitoring that and would get back with our observation.
Note: The server is not using pubsub rest api directly. Its using azure messaging python sdk. Rest API [here](https://docs.microsoft.com/en-us/rest/api/webpubsub/web-pub-sub/add-user-to-group}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the /connect and /connected webhook flow and the Azure messaging Python SDK call that adds a user to a group. Reproduce the intermittent "User not found" response and compare user-based and connection-based group addition; done means identifying the cause or documenting a reliable resolution for the reconnection loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100