Skip to content

Commit 72c48a3

Browse files
Merging pull request PipedreamHQ#18419
1 parent 0185460 commit 72c48a3

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

components/azure_devops/azure_devops.app.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default {
5151
_personalAccessToken() {
5252
return this.$auth.personal_access_token;
5353
},
54-
_makeRequest(args = {}) {
54+
async _makeRequest(args = {}) {
5555
const {
5656
$ = this,
5757
url,
@@ -68,7 +68,14 @@ export default {
6868
? "&"
6969
: "?";
7070
config.url += `api-version=${API_VERSION}`;
71-
return axios($, config);
71+
try {
72+
return await axios($, config);
73+
} catch (error) {
74+
if (error.response?.status === 401 && !useOAuth) {
75+
throw new ConfigurationError("Azure DevOps Personal Access Token is required for this operation. Please verify that your personal access token is correct.");
76+
}
77+
throw error;
78+
}
7279
},
7380
async listAccounts(args = {}) {
7481
const { value } = await this._makeRequest({

components/azure_devops/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/azure_devops",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Azure DevOps Components",
55
"main": "azure_devops.app.mjs",
66
"keywords": [

components/azure_devops/sources/new-event/new-event.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import azureDevops from "../../azure_devops.app.mjs";
22

33
export default {
44
name: "New Event (Instant)",
5-
version: "0.0.3",
5+
version: "0.0.4",
66
key: "azure_devops-new-event",
77
description: "Emit new event for the specified event type.",
88
type: "source",

0 commit comments

Comments
 (0)