From 85c835e5f0ded6b883ee9f14b48bada03d65e64f Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Fri, 12 May 2023 11:14:00 +0100 Subject: [PATCH] Add status check to license api --- qa-core/src/account-api/api/apis/LicenseAPI.ts | 4 ++++ qa-core/src/internal-api/tests/users/appSpecificRoles.spec.ts | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qa-core/src/account-api/api/apis/LicenseAPI.ts b/qa-core/src/account-api/api/apis/LicenseAPI.ts index f726eb5682..f420ab44b9 100644 --- a/qa-core/src/account-api/api/apis/LicenseAPI.ts +++ b/qa-core/src/account-api/api/apis/LicenseAPI.ts @@ -20,6 +20,10 @@ export default class LicenseAPI { internal: true, } ) + + if (response.status !== 200) { + throw new Error(`License Error: ${response.status}`) + } return [response, json] } } diff --git a/qa-core/src/internal-api/tests/users/appSpecificRoles.spec.ts b/qa-core/src/internal-api/tests/users/appSpecificRoles.spec.ts index c3c9395b78..325735b3fc 100644 --- a/qa-core/src/internal-api/tests/users/appSpecificRoles.spec.ts +++ b/qa-core/src/internal-api/tests/users/appSpecificRoles.spec.ts @@ -11,9 +11,6 @@ describe("Internal API - App Specific Roles & Permissions", () => { await config.beforeAll() }) - afterAll(async () => { - await config.afterAll() - }) afterAll(async () => { await config.afterAll() })