diff --git a/src/commands/phpmyadmin.ts b/src/commands/phpmyadmin.ts index 31bdc4784..5b8a7cc69 100644 --- a/src/commands/phpmyadmin.ts +++ b/src/commands/phpmyadmin.ts @@ -201,6 +201,13 @@ export class PhpMyAdminCommand { stack: error.stack, } ); this.stopProgressTracker(); + + if ( error.graphQLErrors?.find( e => e.message === 'Unauthorized' ) ) { + exit.withError( + 'You do not have sufficient permission to access phpMyAdmin for this environment.' + ); + } + exit.withError( 'Failed to enable PhpMyAdmin. Please try again. If the problem persists, please contact support.' );