Docs / EventSourcingDB / Errors / import-unreadable

import-unreadable

Reading the events to import broke off, for example because the client dropped the connection.

  • Route: import-events
  • Description: import is unreadable: the request could not be read to its end
  • Details: None; details is an empty object.

Why It Happens#

An import reads the events while the client sends them, without a limit on their number. Here, reading the request body failed before it ended: the connection dropped, or the client sent nothing for more than five seconds, the limit that an import sets for each read rather than for the whole body. So the transfer failed, not necessarily the events. The log of the server names the cause.

How to Fix It#

Send the events again, without long pauses. EventSourcingDB has removed what it imported so far, so the database holds no events again, and the schemas that were registered before the import are still there. Since the transfer failed rather than the events, sending the same request again can succeed.

Example#

For an import whose client stops sending the events for more than five seconds, 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/import-unreadable",
    "description": "import is unreadable: the request could not be read to its end",
    "details": {}
  }
}