Skip to content

Commit 67bb973

Browse files
committed
Replace panic with error
1 parent 48182ba commit 67bb973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

command/device/createlora.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func CreateLora(params *CreateLoraParams) (*DeviceLoraInfo, error) {
102102
if err != nil {
103103
errDel := iotClient.DeviceDelete(dev.DeviceId)
104104
if errDel != nil { // Oh no
105-
panic(
105+
return nil, fmt.Errorf(
106106
"device was successfully provisioned and configured on IoT-API but " +
107107
"now we can't fetch its information nor delete it - please check " +
108108
"it on the web application.\n\nFetch error: " + err.Error() +

0 commit comments

Comments
 (0)