Adds the snapshot on error decorator