Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command errors? #41

Open
garethsb opened this issue May 10, 2019 · 2 comments
Open

Command errors? #41

garethsb opened this issue May 10, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@garethsb
Copy link
Contributor

If a client sends a WebSocket command which is not even syntactically valid JSON, is there any means for the server to indicate this:

  • i.e. send an error message back,
  • or close the WebSocket connection from the server side,
  • or can it only just ignore the command?

How about if the command message is valid JSON, and also validates against one of the command schemas (or better, the top-level one proposed in #35 (comment)), but is semantically invalid - e.g. one of the specified "sources" in a subscription command doesn't exist?

I am imagining it might be worth defining an error message type in Message types, with a payload of the NMOS core error type? (I see no harm in reusing HTTP status codes here.)

Some clarification of command error handling would be good in v1.0.x documentation, but adding an error response has to wait for v1.1, I guess!

@mjeras
Copy link
Contributor

mjeras commented May 21, 2019

It is a v1.1 issue, to be discussed later

@garethsb
Copy link
Contributor Author

We also noted on the call that it would ideally involve a way for an error response to identify which command message it is referring to, which is non-trivial.

@garethsb garethsb added the enhancement New feature or request label May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants