Skip to content

Commit

Permalink
Convert to BugError with useful retry message
Browse files Browse the repository at this point in the history
  • Loading branch information
amcaplan committed Oct 1, 2024
1 parent 2aab344 commit 11600b5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/theme/src/cli/services/local-storage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AbortError} from '@shopify/cli-kit/node/error'
import {BugError} from '@shopify/cli-kit/node/error'
import {LocalStorage} from '@shopify/cli-kit/node/local-storage'
import {outputDebug, outputContent} from '@shopify/cli-kit/node/output'

Expand Down Expand Up @@ -114,7 +114,14 @@ export function removeStorefrontPassword(): void {
function requireThemeStore(): string {
const themeStore = getThemeStore()
if (!themeStore) {
throw new AbortError('Theme store is not set')
throw new BugError(
'Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.',
[
'It may be possible to recover by running',
{command: 'shopify theme list --store <store>'},
'(setting the store flag to the store you wish to use) and then running the command again.',
],
)
}
return themeStore
}

0 comments on commit 11600b5

Please sign in to comment.