From b546512a2f3941d56d0ad3c07def3802568b9382 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 3 Dec 2024 10:40:00 +0000 Subject: [PATCH] Fix TS errors --- packages/frontend-core/src/api/licensing.ts | 6 +++--- packages/frontend-core/src/api/types.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/frontend-core/src/api/licensing.ts b/packages/frontend-core/src/api/licensing.ts index 9211f5a7b0..8d226835b5 100644 --- a/packages/frontend-core/src/api/licensing.ts +++ b/packages/frontend-core/src/api/licensing.ts @@ -6,7 +6,7 @@ import { GetOfflineLicenseTokenResponse, QuotaUsage, } from "@budibase/types" -import { BaseAPIClient } from "./types" +import { APIError, BaseAPIClient } from "./types" export interface LicensingEndpoints { activateLicenseKey: (licenseKey: string) => Promise @@ -40,7 +40,7 @@ export const buildLicensingEndpoints = ( return await API.get({ url: "/api/global/license/key", }) - } catch (e) { + } catch (e: any) { if (e.status !== 404) { throw e } @@ -66,7 +66,7 @@ export const buildLicensingEndpoints = ( return await API.get({ url: "/api/global/license/offline", }) - } catch (e) { + } catch (e: any) { if (e.status !== 404) { throw e } diff --git a/packages/frontend-core/src/api/types.ts b/packages/frontend-core/src/api/types.ts index db8c8856ac..a887b67750 100644 --- a/packages/frontend-core/src/api/types.ts +++ b/packages/frontend-core/src/api/types.ts @@ -85,10 +85,10 @@ export type BaseAPIClient = { export type APIError = { message?: string + url?: string + method?: HTTPMethod json: any status: number - url: string - method: HTTPMethod handled: boolean suppressErrors: boolean }