spec/index: improve error reporting