diff --git a/src/publish.ts b/src/publish.ts index f5c71f4f..3c47ac40 100644 --- a/src/publish.ts +++ b/src/publish.ts @@ -137,7 +137,9 @@ async function _publish(packagePath: string, manifest: Manifest, options: IInter } catch (err) { const message = (err && err.message) || ''; - if (/Invalid Resource/.test(message)) { + if (/Personal Access Token used has expired/.test(message)) { + err.message = `${err.message}\n\nYou're using an expired Personal Access Token, please get a new PAT.\nMore info: https://aka.ms/vscodepat`; + } else if (/Invalid Resource/.test(message)) { err.message = `${err.message}\n\nYou're likely using an expired Personal Access Token, please get a new PAT.\nMore info: https://aka.ms/vscodepat`; }