From 51232bd52afb8032d9fe3811d1de69d976987825 Mon Sep 17 00:00:00 2001 From: kitakitabauer Date: Thu, 28 May 2020 17:12:13 +0900 Subject: [PATCH] appstore: fix HandleError --- appstore/validator.go | 2 ++ appstore/validator_test.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/appstore/validator.go b/appstore/validator.go index dee06bc..698506f 100644 --- a/appstore/validator.go +++ b/appstore/validator.go @@ -70,6 +70,8 @@ func HandleError(status int) error { e = ErrReceiptIsForTest case 21008: e = ErrReceiptIsForProduction + case 21009: + e = ErrInternalDataAccessError case 21010: e = ErrReceiptUnauthorized default: diff --git a/appstore/validator_test.go b/appstore/validator_test.go index 2981cb9..51c6a46 100644 --- a/appstore/validator_test.go +++ b/appstore/validator_test.go @@ -58,6 +58,11 @@ func TestHandleError(t *testing.T) { in: 21008, out: ErrReceiptIsForProduction, }, + { + name: "status 21009", + in: 21009, + out: ErrInternalDataAccessError, + }, { name: "status 21010", in: 21010,