Code Monkey home page Code Monkey logo

Comments (7)

jessehouwing avatar jessehouwing commented on May 18, 2024 1

You still want the tfx tool to set a better error message in the json object or output that to the error stream so I can render it.

from azure-devops-extension-tasks.

jessehouwing avatar jessehouwing commented on May 18, 2024

from azure-devops-extension-tasks.

masters3d avatar masters3d commented on May 18, 2024

TFX's error is more descriptive:

Checking if this extension is already published
It isn't, create a new extension.
error: Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired.

from azure-devops-extension-tasks.

jessehouwing avatar jessehouwing commented on May 18, 2024

from azure-devops-extension-tasks.

masters3d avatar masters3d commented on May 18, 2024

I found the issue. This repo's Task extension is using the JSON output which does not output all what the regular client output does.

See these lines:
https://github.com/Microsoft/vsts-extension-build-release-tasks/blob/master/BuildTasks/PublishExtension/PublishExtension.ts#L117

https://github.com/Microsoft/vsts-extension-build-release-tasks/blob/master/BuildTasks/PublishExtension/PublishExtension.ts#L9

Sample: Regular output

C:\extension>tfx extension publish  --auth-type pat
TFS Cross Platform Command Line Interface v0.4.11
Copyright Microsoft Corporation
> Personal access token:
Checking if this extension is already published
It isn't, create a new extension.
error: Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired.

-- JSON option the publish task is using.

C:\extension>tfx extension publish --json --auth-type pat
> Personal access token:
error: Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired.

from azure-devops-extension-tasks.

jessehouwing avatar jessehouwing commented on May 18, 2024

That is by design. We need the Jason in order to extract certain values. The tool can't return anything else on the output stream, as it would not be valid json.

So we only render the error stream. Still not sure what you are trying to read from output. It always checks the existence of the extension and it always creates a new one if it doesn't exist already. Requires the same permissions.

This is not the error you're looking for.

from azure-devops-extension-tasks.

masters3d avatar masters3d commented on May 18, 2024

That is fair. Closing in favor for better error message at tfx.

from azure-devops-extension-tasks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.