File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1- import { axios } from "@pipedream/platform" ;
1+ import {
2+ axios , ConfigurationError ,
3+ } from "@pipedream/platform" ;
24const API_VERSION = "5.0" ;
35
46export default {
@@ -29,9 +31,13 @@ export default {
2931 return "https://dev.azure.com" ;
3032 } ,
3133 _headers ( useOAuth ) {
32- const basicAuth = Buffer . from ( ` ${ this . _oauthUid ( ) } : ${ useOAuth
34+ const token = useOAuth
3335 ? this . _oauthAccessToken ( )
34- : this . _personalAccessToken ( ) } `) . toString ( "base64" ) ;
36+ : this . _personalAccessToken ( ) ;
37+ if ( ! token && ! useOAuth ) {
38+ throw new ConfigurationError ( "Azure DevOps Personal Access Token is required for this operation. Add it to your Azure DevOps connection." ) ;
39+ }
40+ const basicAuth = Buffer . from ( `${ this . _oauthUid ( ) } :${ token } ` ) . toString ( "base64" ) ;
3541 return {
3642 Authorization : `Basic ${ basicAuth } ` ,
3743 } ;
You can’t perform that action at this time.
0 commit comments