【发布时间】:2021-11-19 01:15:31
【问题描述】:
我有一个带有 PowerShell 代码的 Azure Pipeline,它可以为不同的部署阶段动态交换审批者。批准人由using the API 交换。该代码运行了几次,但不知何故它在我没有进行任何更改的情况下就崩溃了。现在,我收到错误消息:
Invoke-RestMethod:
{
"$id":"1",
"innerException":null,
"message":"VS402865: An empty body in the POST request is not allowed.",
"typeName":"Microsoft.VisualStudio.Services.ReleaseManagement.Data.Exceptions.InvalidRequestException,Microsoft.VisualStudio.Services.ReleaseManagement2.Data",
"typeKey":"InvalidRequestException",
"errorCode":0,
"eventId":3000
}
还有其他人收到同样的错误吗?是 Azure DevOps 问题吗?
【问题讨论】:
-
检查 Pat Token 或身份验证详细信息
-
在管道本身中,我使用管道提供的 OAuth 令牌(为每次运行生成)。在 Powershell 中测试代码时,我正在使用具有 B64 转换和对管道的完全访问权限的 PAT。