From 3a8208318ee80afb1cc9b812a09a67f53d8f0232 Mon Sep 17 00:00:00 2001 From: Andrea Franz Date: Fri, 26 Apr 2019 16:35:21 +0200 Subject: [PATCH] return ErrBadResponse with unexpected response --- shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell.go b/shell.go index f2bf66e..8e1d8d4 100644 --- a/shell.go +++ b/shell.go @@ -212,7 +212,7 @@ func (s *Shell) commandGPSendAPDU(args ...string) error { if resp.Sw != apdu.SwOK { logger.Error("unexpected response", "sw", fmt.Sprintf("%x", resp.Sw)) - return err + return apdu.NewErrBadResponse(resp.Sw, "unexpected response") } return nil