From e14fd5e496d7efe1660994bbe6e0dd260a146d51 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Sat, 7 Sep 2024 17:41:05 +0300 Subject: [PATCH 1/2] Return the response and the error --- internal/handlers/ussd/menuhandler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index 27af8f4..066eef2 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -203,7 +203,7 @@ func (h *Handlers) SavePin(ctx context.Context, sym string, input []byte) (resou err = utils.WriteEntry(ctx, h.userdataStore, sessionId, utils.DATA_ACCOUNT_PIN, []byte(accountPIN)) if err != nil { - return res, nil + return res, err } return res, nil From deb4706b1d05f3670172ba64992696565c042eb4 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Sat, 7 Sep 2024 17:51:30 +0300 Subject: [PATCH 2/2] Test commit --- internal/handlers/ussd/menuhandler_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/handlers/ussd/menuhandler_test.go b/internal/handlers/ussd/menuhandler_test.go index 4ab3046..4f26e12 100644 --- a/internal/handlers/ussd/menuhandler_test.go +++ b/internal/handlers/ussd/menuhandler_test.go @@ -165,3 +165,7 @@ func TestSaveFamilyname(t *testing.T) { }) } } + +func testSavePin () { + +} \ No newline at end of file