- status: failedStationInfos.length > 0 ? ResponseStatus.FAILURE : ResponseStatus.SUCCESS,
- hashIdsSucceeded: succeededStationInfos.map(stationInfo => stationInfo.hashId),
+ status: err != null ? ResponseStatus.FAILURE : ResponseStatus.SUCCESS,
+ ...(succeededStationInfos.length > 0 && {
+ hashIdsSucceeded: succeededStationInfos.map(stationInfo => stationInfo.hashId)
+ }),