return an error when there is no output (instead of an empty array)