File tree 1 file changed +10
-4
lines changed
packages/cli-v3/src/commands 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,19 @@ export async function login(options?: LoginOptions): Promise<LoginResult> {
113
113
) ;
114
114
115
115
if ( ! whoAmIResult . success ) {
116
- prettyError ( "Whoami failed " , whoAmIResult . error ) ;
116
+ prettyError ( "Unable to validate existing personal access token " , whoAmIResult . error ) ;
117
117
118
118
if ( ! opts . embedded ) {
119
- outro ( "Login failed" ) ;
120
- }
119
+ outro (
120
+ `Login failed using stored token. To fix, first logout using \`trigger.dev logout${
121
+ options ?. profile ? ` --profile ${ options . profile } ` : ""
122
+ } \` and then try again.`
123
+ ) ;
121
124
122
- throw new Error ( whoAmIResult . error ) ;
125
+ throw new SkipLoggingError ( whoAmIResult . error ) ;
126
+ } else {
127
+ throw new Error ( whoAmIResult . error ) ;
128
+ }
123
129
} else {
124
130
if ( ! opts . embedded ) {
125
131
const continueOption = await select ( {
You can’t perform that action at this time.
0 commit comments