Docs / EventSourcingDB / Errors / event-hash-missing

event-hash-missing

An anchor names an event without its hash.

  • Routes: create-backup and audit-history
  • Description: event hash is missing: expected the hash of the event, as the previous audit or backup answered it
  • Details: None; details is an empty object.

Why It Happens#

An anchor names the event that a previous run ended at, by its id and its hash: lastBackedUpEvent for an incremental backup, and lastAuditedEvent for an audit. This one has an id, but no hash, or an empty one.

The id is checked first: an anchor without one, or with one that is not valid, is reported as event-id-missing or event-id-malformed, and a hash that is there but not valid as event-hash-malformed.

How to Fix It#

Send the anchor as the previous backup or audit answered it, with both its id and its hash. Sending the same request again fails the same way.

Example#

For a backup whose lastBackedUpEvent is { "id": "41" }, 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/event-hash-missing",
    "description": "event hash is missing: expected the hash of the event, as the previous audit or backup answered it",
    "details": {}
  }
}