Error codes

Edit this page

SRV012

A live stream was used in a wrong state.

  • Error: SerovalLiveStreamError
  • Step: none
  • Fields: reason, one of consumed, pending, reading or closed.

What it means

A live stream method was called at a time the stream does not allow. This error is never wrapped, so its production message has no step.

Common causes

  • consumed: consume() was called on a stream that already has a reader. Serializing a live stream also reads it.
  • pending: write, close or fail was called while an earlier event was not accepted yet.
  • reading: the consumer called read() while an earlier read() had not settled.
  • closed: a method was called after the stream ended.

How to fix it

  • Await each write before the next one.
  • Await each read(), and call accept(), before the next read().
  • Give each live stream one reader. Make a new stream for each request.