Handle billing required

This commit is contained in:
Girish Ramakrishnan
2019-05-04 21:56:34 -07:00
parent 6ab38633c2
commit 74fdcb0781
+1
View File
@@ -33,6 +33,7 @@ function getSubscription(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
appstore.getSubscription(function (error, result) {
if (error && error.reason === AppstoreError.BILLING_REQUIRED) return next(new HttpError(402, error.message));
if (error && error.reason === AppstoreError.EXTERNAL_ERROR) return next(new HttpError(424, error.message));
if (error) return next(new HttpError(500, error));