diff --git a/eng/tsp-core/pipelines/pr-tools.yml b/eng/tsp-core/pipelines/pr-tools.yml index 3a043556cd..260dd40759 100644 --- a/eng/tsp-core/pipelines/pr-tools.yml +++ b/eng/tsp-core/pipelines/pr-tools.yml @@ -43,6 +43,7 @@ extends: scriptLocation: inlineScript inlineScript: | az storage blob upload-batch \ + --auth-mode login \ --destination \$web \ --account-name "cadlplayground" \ --destination-path $(TYPESPEC_WEBSITE_BASE_PATH) \ @@ -56,6 +57,7 @@ extends: scriptLocation: inlineScript inlineScript: | az storage blob upload-batch \ + --auth-mode login \ --destination \$web \ --account-name "tspwebsitepr" \ --destination-path $(TYPESPEC_WEBSITE_BASE_PATH) \ diff --git a/eng/tsp-core/pipelines/publish.yml b/eng/tsp-core/pipelines/publish.yml index 42588e0c21..e70f764fb0 100644 --- a/eng/tsp-core/pipelines/publish.yml +++ b/eng/tsp-core/pipelines/publish.yml @@ -86,6 +86,7 @@ extends: scriptLocation: inlineScript inlineScript: | az storage blob upload-batch ^ + --auth-mode login ^ --destination $web ^ --account-name "cadlplayground" ^ --destination-path / ^ diff --git a/eng/tsp-core/scripts/create-tryit-comment.ts b/eng/tsp-core/scripts/create-tryit-comment.ts index dadb1114fe..726cfa406b 100644 --- a/eng/tsp-core/scripts/create-tryit-comment.ts +++ b/eng/tsp-core/scripts/create-tryit-comment.ts @@ -88,5 +88,8 @@ async function request(method: string, url: string, data: any): Promise body: data.body, }); + if (!response.ok) { + throw new Error(`Request failed: ${response.statusText}\n\n` + (await response.text())); + } return response.text(); }