Skip to content

← All questions

Our streaming endpoint returns 200 and then dies mid-stream, and nothing catches it

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

The API steps assert on a completed response, which is fine until the response is a stream. Ours opens with a 200, sends a few events and then fails halfway — and

gherkin
Then the response status should be 200

is perfectly happy with that, because the status was genuinely 200. The failure is in the middle and nothing in the step library can see it.

Has anyone assembled something for server-sent events? What I think I need is an assertion that the stream closed cleanly and one that no error event arrived, and I would rather not invent the vocabulary if someone has already settled on one.

No answers yet

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related