Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Issues in JS SDK #4

Open
1 of 4 tasks
chenkennt opened this issue Mar 10, 2021 · 2 comments
Open
1 of 4 tasks

Issues in JS SDK #4

chenkennt opened this issue Mar 10, 2021 · 2 comments

Comments

@chenkennt
Copy link

chenkennt commented Mar 10, 2021

Use this issue to track the issues I found when using the SDK:

  • Send message will stringify payload even it's plain text
    Send a message from server to client (e.g. use sendToAll), client will receive a message enclosed with quotes. The payload is treated as json and SDK does a JSON.stringify() over it even the payload is plain text.
  • Client connection fails if onConnect returns nothing
    If onConnect handler returns nothing, client connection will fail. Need to return an empty object ({}) even no additional information is returned.
  • User events are printed out in console by default
    SDK will print out all user events to console and seems it cannot be disabled.
  • Incorrect connection request never returns response
    Use a http test tool like postman or curl to post a blank request to a event handler, SDK will throw exception as the request doesn't contain excepted headers, but the request never returns. The expected behavior should be returning 400.
@chenkennt
Copy link
Author

  • Url <event-handler-path>/ does not match <event-handler-path>
    Always get this error message when processing an incoming event
  • Suggestion: provide a service client in event handler context

@chenkennt
Copy link
Author

chenkennt commented Mar 11, 2021

  • WebPubSubServer.endpoint.clientNegotiate shouldn't require hubName
    Since it's already a parameter of WebPubSubServer constructor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant