Fix missing 'error' key in output