Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Improve 401 status code error message
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Jul 15, 2024
1 parent 5a1ac75 commit 40deddb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/util/create-context-and-run-program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ export const createContextAndRunProgram = async (process_args: any) => {
}
// end ignores ---

if (err.response?.status === 401) {
console.log(kleur.red("Authentication failed. Please run 'tsci login' to authenticate yourself."))
process.exit(1)
}

console.log(
kleur.red(
`[ERR] ${err.response?.status} ${err.config.method?.toUpperCase()} ${
Expand Down

0 comments on commit 40deddb

Please sign in to comment.