Skip to content

Commit 99925c9

Browse files
committed
better error message for org token
1 parent e24706d commit 99925c9

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

auth.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ export function createTrpcClient(debug: boolean, deployUrl: string) {
7070
}
7171

7272
if (tokenIsTemp) {
73-
error(
74-
debug,
75-
"The token specified via 'DENO_DEPLOY_TOKEN' is invalid.",
76-
);
73+
if (token_storage.get()?.startsWith("ddo_")) {
74+
error(
75+
debug,
76+
"Organization tokens cannot be used for the 'deno deploy' subcommand.",
77+
);
78+
} else {
79+
error(
80+
debug,
81+
"The token specified via 'DENO_DEPLOY_TOKEN' or the '--token' flag is invalid.",
82+
);
83+
}
7784
}
7885

7986
if (typeof retryPromise !== "undefined") {

0 commit comments

Comments
 (0)