From 68a3079ceef488da725d1055e7ab9c19bce4957e Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Wed, 18 Sep 2024 12:04:46 +0900 Subject: [PATCH] Enhance readability of error message --- .../theme/src/cli/utilities/theme-environment/html.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/theme/src/cli/utilities/theme-environment/html.ts b/packages/theme/src/cli/utilities/theme-environment/html.ts index 0e8a01a2c9..164eb22078 100644 --- a/packages/theme/src/cli/utilities/theme-environment/html.ts +++ b/packages/theme/src/cli/utilities/theme-environment/html.ts @@ -120,10 +120,12 @@ function assertThemeId(response: Response, html: string, expectedThemeId: string if (obtainedThemeId && obtainedThemeId !== expectedThemeId) { renderFatalError( new AbortError( - `Theme ID mismatch: expected ${expectedThemeId} but got ${obtainedThemeId}.\nRequest ID: ${response.headers.get( - 'x-request-id', - )}\nURL: ${response.url}`, - `This is likely related to an issue in upstream Shopify APIs.\nPlease try again in a few minutes and report this issue:\nhttps://github.com/Shopify/cli/issues/new?template=bug-report.yml`, + `Theme ID mismatch: expected ${expectedThemeId} but got ${obtainedThemeId}.` + + `\nRequest ID: ${response.headers.get('x-request-id')}` + + `\nURL: ${response.url}`, + `This is likely related to an issue in upstream Shopify APIs.` + + `\nPlease try again in a few minutes and report this issue:` + + `\nhttps://github.com/Shopify/cli/issues/new?template=bug-report.yml`, ), )