From 8ecd7d3c60e22e1330b0f1d20d334698f98f016c Mon Sep 17 00:00:00 2001 From: Ross Stenersen Date: Fri, 6 Nov 2026 08:55:11 -0600 Subject: [PATCH] feat: add link to getting started to paid plan required note --- src/__tests__/lib/command/util/smartapps-util.test.ts | 8 +++----- src/lib/command/util/smartapps-util.ts | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/__tests__/lib/command/util/smartapps-util.test.ts b/src/__tests__/lib/command/util/smartapps-util.test.ts index e0a6ce31..6145889f 100644 --- a/src/__tests__/lib/command/util/smartapps-util.test.ts +++ b/src/__tests__/lib/command/util/smartapps-util.test.ts @@ -28,11 +28,9 @@ describe('paidPlanRequiredHandler', () => { it('exits with a helpful message on 403', () => { expect(() => paidPlanRequiredHandler({ response: { status: 403 } })).toThrow('should exit') - expect(fatalErrorMock).toHaveBeenCalledExactlyOnceWith( - 'Creating or modifying a Smart App requires a paid plan. Visit' + - '\n https://developer.smartthings.com/console/service-integrations/manage-plans' + - '\nto upgrade.', - ) + expect(fatalErrorMock).toHaveBeenCalledExactlyOnceWith(expect.stringContaining( + 'Creating or modifying a Smart App requires a paid plan.', + )) }) it('rethrows other errors', () => { diff --git a/src/lib/command/util/smartapps-util.ts b/src/lib/command/util/smartapps-util.ts index 48cb05c1..a968135d 100644 --- a/src/lib/command/util/smartapps-util.ts +++ b/src/lib/command/util/smartapps-util.ts @@ -17,7 +17,9 @@ export const paidPlanRequiredHandler = (error: unknown): never => { if ((error as { response?: { status?: number } } | undefined)?.response?.status === 403) { return fatalError('Creating or modifying a Smart App requires a paid plan. Visit' + '\n https://developer.smartthings.com/console/service-integrations/manage-plans' + - '\nto upgrade.') + '\nto upgrade.' + + '\n\nMore info can be found at' + + '\n https://developer.smartthings.com/docs/service-integrations/get-started') } throw error }