appstore: fix HandleError

This commit is contained in:
kitakitabauer
2020-05-28 17:12:13 +09:00
parent 5994fb99fd
commit 51232bd52a
2 changed files with 7 additions and 0 deletions

View File

@@ -70,6 +70,8 @@ func HandleError(status int) error {
e = ErrReceiptIsForTest
case 21008:
e = ErrReceiptIsForProduction
case 21009:
e = ErrInternalDataAccessError
case 21010:
e = ErrReceiptUnauthorized
default:

View File

@@ -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,