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

Streaming API error handling/reporting improvements #5141

Merged
merged 7 commits into from
Mar 24, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
a few words about warnings in the Streaming API
  • Loading branch information
leo-da committed Mar 24, 2020
commit cc621febb931543d626302ac2fe16252ccebde7b
25 changes: 22 additions & 3 deletions docs/source/json-api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,29 @@ JavaScript/Node.js example demonstrating how to establish Streaming API connecti
console.log(data)
})

Error Reporting
===============
Error and Warning Reporting
===========================

Errors and warnings reported as part of the regular ``on-message`` flow.

Streaming API error messages formatted the same way as :ref:`synchronous API errors <error-format>`.

Streaming API reports only one type of warnings -- unknown template IDs, which is formatted as:

.. code-block:: none

{"warnings":{"unknownTemplateIds":<JSON Array of template ID strings>>}}

Errors reported as part of the standard ``on-message`` flow and formatted the same way as :ref:`synchronous API errors <error-format>`.
Examples:

.. code-block:: none

{"warnings": {"unknownTemplateIds": ["UnknownModule:UnknownEntity"]}}

{
"errors":["JsonReaderError. Cannot read JSON: <{\"templateIds\":[]}>. Cause: spray.json.DeserializationException: search requires at least one item in 'templateIds'"],
"status":400
}

Contracts Query Stream
======================
Expand Down