Skip to content

Commit

Permalink
Update src/cmd/wifi.js
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Vanier <[email protected]>
  • Loading branch information
keeramis and monkbroc authored Jun 4, 2024
1 parent 348cf02 commit 947441e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cmd/wifi.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,9 @@ module.exports = class WiFiCommands extends CLICommandBase {
// Example: WPA_AES, WPA_TKIP, WPA_AES+TKIP are all treated as WPA_PSK.
// For the exact mapping, see https://github.com/particle-iot/device-os-protobuf/blob/main/control/wifi_new.proto
_convertToKnownSecType(security) {
try {
return securityMapping[security];
} catch (error) {
throw new Error(`Unknown security type: ${security} - ${error.message}`);
const mapping = securityMapping[security];
if (!mapping) {
throw new Error(`Unknown security type: ${security}`);
}
}

Expand Down

0 comments on commit 947441e

Please sign in to comment.