Skip to content

Commit

Permalink
console: Account for invalid responses in template conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
kschiffer committed Jan 8, 2024
1 parent 6a25070 commit 561c746
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/webui/console/containers/device-importer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ const DeviceImporter = () => {

if (devices.length === 0) {
throw conversionError
} else {
const invalidEntries = devices.filter(device => !('end_device' in device))
if (devices.some(device => !('end_device' in device))) {
appendToLog('Invalid responses found:')
appendToLog(invalidEntries)

throw conversionError
}
}

setConvertedDevices(devices)
Expand Down

0 comments on commit 561c746

Please sign in to comment.