Docs / EventSourcingDB / Errors / bound-type-unknown

bound-type-unknown

The type of a bound is neither inclusive nor exclusive.

  • Routes: read-events and observe-events
  • Description: bound type is unknown: expected 'inclusive' or 'exclusive'
  • Details: bound, the bound whose type is unknown: lowerBound, or, when reading, upperBound. value, the type as the request gave it.

Why It Happens#

The type of a bound says whether the event with the bound's ID belongs to the range: inclusive includes it, exclusive leaves it out. No other value is accepted, and the values are case-sensitive, so Inclusive is refused, and so are words from other APIs, such as closed, open, or gte.

Before the type, the id of the bound is checked, and a bound without an id, or with one that is not a non-negative integer without a sign or a leading zero, is reported as event-id-missing or event-id-malformed. A type that is left out or empty is reported as bound-type-missing. When reading, lowerBound is checked before upperBound.

How to Fix It#

Send the type in lowercase, as inclusive or exclusive. To resume after the last event you received, for example, use its ID with exclusive. Sending the same request again fails the same way.

Example#

To read the events of /books/42 with a lowerBound of the type after, EventSourcingDB answers with this error, as a line of the stream, and then ends the stream with its end item:

{
  "type": "error",
  "data": {
    "code": "https://docs.eventsourcingdb.io/errors/bound-type-unknown",
    "description": "bound type is unknown: expected 'inclusive' or 'exclusive'",
    "details": {
      "bound": "lowerBound",
      "value": "after"
    }
  }
}