@@ -12,6 +12,7 @@ import {
1212 buildProjectSetupNextActions ,
1313 inferTargetName ,
1414 inspectProjectBinding ,
15+ projectResolutionErrorToCliError ,
1516 resolveProjectTarget ,
1617 sortProjects ,
1718 type ProjectCandidate ,
@@ -563,13 +564,17 @@ async function resolveProjectShowInRealMode(
563564 throw authRequiredError ( ) ;
564565 }
565566
566- return inspectProjectBinding ( {
567+ const result = await inspectProjectBinding ( {
567568 context,
568569 workspace,
569570 explicitProject,
570571 listProjects : ( ) => listRealWorkspaceProjects ( client , workspace , context . runtime . signal ) ,
571572 commandName : "project show" ,
572573 } ) ;
574+ if ( result . isErr ( ) ) {
575+ throw projectResolutionErrorToCliError ( result . error ) ;
576+ }
577+ return result . value ;
573578}
574579
575580async function resolveRequiredProjectInRealMode (
@@ -583,27 +588,35 @@ async function resolveRequiredProjectInRealMode(
583588 throw authRequiredError ( ) ;
584589 }
585590
586- return resolveProjectTarget ( {
591+ const result = await resolveProjectTarget ( {
587592 context,
588593 workspace,
589594 explicitProject,
590595 listProjects : ( ) => listRealWorkspaceProjects ( client , workspace , context . runtime . signal ) ,
591596 commandName,
592597 } ) ;
598+ if ( result . isErr ( ) ) {
599+ throw projectResolutionErrorToCliError ( result . error ) ;
600+ }
601+ return result . value ;
593602}
594603
595604async function resolveProjectShowInFixtureMode (
596605 context : CommandContext ,
597606 workspace : AuthWorkspace ,
598607 explicitProject : string | undefined ,
599608) : Promise < ProjectShowResult > {
600- return inspectProjectBinding ( {
609+ const result = await inspectProjectBinding ( {
601610 context,
602611 workspace,
603612 explicitProject,
604613 listProjects : async ( ) => listFixtureWorkspaceProjects ( context , workspace ) ,
605614 commandName : "project show" ,
606615 } ) ;
616+ if ( result . isErr ( ) ) {
617+ throw projectResolutionErrorToCliError ( result . error ) ;
618+ }
619+ return result . value ;
607620}
608621
609622async function resolveRequiredProjectInFixtureMode (
@@ -612,13 +625,17 @@ async function resolveRequiredProjectInFixtureMode(
612625 explicitProject : string | undefined ,
613626 commandName : string ,
614627) : Promise < ResolvedProjectTarget > {
615- return resolveProjectTarget ( {
628+ const result = await resolveProjectTarget ( {
616629 context,
617630 workspace,
618631 explicitProject,
619632 listProjects : async ( ) => listFixtureWorkspaceProjects ( context , workspace ) ,
620633 commandName,
621634 } ) ;
635+ if ( result . isErr ( ) ) {
636+ throw projectResolutionErrorToCliError ( result . error ) ;
637+ }
638+ return result . value ;
622639}
623640
624641export async function listRealWorkspaceProjects (
0 commit comments