Skip to content

Commit

Permalink
fix(devices): error when no device to list
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaël Philippe authored and Gaël Philippe committed Mar 22, 2022
1 parent e5fb459 commit 4f761db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ func handleClientError(err error) {

// Device Errors
case errors.Is(err, apierrors.ErrorNoDevice),
errors.Is(err, auth.ErrorDeviceNotRegistered):
errors.Is(err, auth.ErrorDeviceNotRegistered),
// There is a an undetermined path where only this seem to work…
strings.Contains(err.Error(), auth.ErrorDeviceNotRegistered.Error()):
kserrors.DeviceNotRegistered(err).Print()

case errors.Is(err, apierrors.ErrorBadDeviceName):
Expand Down

0 comments on commit 4f761db

Please sign in to comment.