wal: propagate errors

fixes #1263