Skip to content

Commit 5573987

Browse files
Improve message for multiple tunnel plugins error
1 parent 1565cbc commit 5573987

File tree

1 file changed

+7
-1
lines changed
  • packages/app/src/cli/services/dev

1 file changed

+7
-1
lines changed

packages/app/src/cli/services/dev/urls.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,13 @@ export async function startTunnelPlugin(config: Config, port: number, provider:
280280
const results = Object.values(hooks).filter(
281281
(tunnelResponse) => !tunnelResponse?.isErr() || tunnelResponse.error.type !== 'invalid-provider',
282282
)
283-
if (results.length > 1) throw new BugError(`Multiple tunnel plugins for ${provider} found`)
283+
if (results.length > 1)
284+
throw new AbortError(`Multiple tunnel plugins for ${provider} found`, [
285+
'You can check the current plugins with',
286+
{command: 'shopify plugins'},
287+
'and remove them with',
288+
{command: 'shopify plugins remove'},
289+
])
284290
const first = results[0]
285291
if (!first) throw new BugError(`We couldn't find the ${provider} tunnel plugin`)
286292
if (first.isErr()) {

0 commit comments

Comments
 (0)