Skip to content

← All questions

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

Asked 74 views0 answers

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.

asked by Kostya Petrov7,903 ·

No answers yet

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related