Skip to content

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Sep 19, 2025

Resolves #15414

Summary by CodeRabbit

  • New Features
    • Clearer authentication error messages for Azure DevOps, including guidance when a Personal Access Token is required.
  • Bug Fixes
    • Improved reliability of Azure DevOps requests with better error handling.
  • Chores
    • Bumped Azure DevOps package version to 0.1.1.
    • Updated New Event (Instant) source version to 0.0.4.

Copy link

vercel bot commented Sep 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Sep 19, 2025 7:02pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 19, 2025 7:02pm

Copy link
Contributor

coderabbitai bot commented Sep 19, 2025

Walkthrough

The Azure DevOps app’s internal request method was made asynchronous with added try/catch error handling, including a specific 401 case when not using OAuth. The source and package versions were incremented: app package to 0.1.1 and New Event (Instant) source to 0.0.4.

Changes

Cohort / File(s) Summary
Azure DevOps app request flow
components/azure_devops/azure_devops.app.mjs
_makeRequest converted to async, awaiting axios; wrapped in try/catch; added conditional handling for 401 to throw ConfigurationError when not using OAuth; otherwise rethrow error.
Version bumps
components/azure_devops/package.json, components/azure_devops/sources/new-event/new-event.mjs
Bumped package version 0.1.00.1.1; bumped source version 0.0.30.0.4.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client
  participant AzureDevOpsApp as AzureDevOps App
  participant Axios as HTTP Client

  Client->>AzureDevOpsApp: _makeRequest(args)
  activate AzureDevOpsApp
  AzureDevOpsApp->>Axios: await axios(request)
  alt Success
    Axios-->>AzureDevOpsApp: Response
    AzureDevOpsApp-->>Client: Response data
  else Error
    Axios-->>AzureDevOpsApp: Error (e)
    alt e.response.status == 401 AND auth != OAuth
      AzureDevOpsApp-->>Client: throw ConfigurationError("Valid Personal Access Token required")
    else Other errors
      AzureDevOpsApp-->>Client: rethrow e
    end
  end
  deactivate AzureDevOpsApp
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I hop through code with whiskers bright,
Async winds turn day from night;
A 401? I twitch, I know—
Toss a clear error, then I go.
Versions nudge, releases sing,
Pipelines mend with a happy spring. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning Linked issue #15414 reports that the "Cannot Assign" event type dropdown returns empty options; the changes in this PR are limited to making _makeRequest async and adding 401 error handling in components/azure_devops/azure_devops.app.mjs plus version bumps, and there is no visible modification to the code that populates trigger parameter options (e.g., the parameter resolution or the source that lists event types). Based on the provided diffs and summaries, the PR does not clearly implement the specific fix described in the linked issue. Confirm and include the specific changes that fix the event-type parameter population (or explain how the new error handling directly resolves the reported symptom), and add notes or tests showing the dropdown now returns valid options for the "Cannot Assign" trigger before marking the linked issue as resolved.
Description Check ⚠️ Warning The PR description contains only "Resolves #15414" and does not follow the repository's required template (the template requires a "## WHY" section), so it lacks the motivation, summary of code changes, and testing/impact details needed for a reviewer to assess the change. Please update the PR description to follow the repository template by adding a "## WHY" section that explains the motivation, a brief summary of the code changes (files modified and rationale), how this resolves #15414, and any testing or manual verification steps so reviewers can validate the fix.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Azure Dev Ops - improve error handling" is concise, directly related to the primary change in this PR (improvements to error handling in the Azure DevOps app module, notably components/azure_devops/azure_devops.app.mjs), and clear enough for a teammate scanning history to understand the main intent.
Out of Scope Changes Check ✅ Passed The modified files are limited to the Azure DevOps app module and version bumps (components/azure_devops/azure_devops.app.mjs, package.json, and the source version), which are consistent with the stated objective of improving Azure DevOps error handling and preparing a release; there are no unrelated file changes in the provided summary.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-15414

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
components/azure_devops/azure_devops.app.mjs (5)

71-78: Also handle OAuth 401 (and 403) with actionable messages.

Give distinct guidance when OAuth token expired and when permissions are insufficient.

Apply this diff:

       try {
-        return await axios($, config);
+        return await axios($, config);
       } catch (error) {
-        if (error.response?.status === 401 && !useOAuth) {
-          throw new ConfigurationError("Azure DevOps Personal Access Token is required for this operation. Please verify that your personal access token is correct.");
-        }
-        throw error;
+        const status = error.response?.status;
+        if (status === 401) {
+          if (useOAuth) {
+            throw new ConfigurationError("Azure DevOps OAuth token is invalid or expired. Please reconnect your Azure DevOps account.");
+          }
+          throw new ConfigurationError("Azure DevOps Personal Access Token is invalid or missing. Verify your PAT in the connection.");
+        }
+        if (status === 403) {
+          throw new ConfigurationError("Access denied by Azure DevOps. Ensure the token has permissions to manage Service Hooks in this organization.");
+        }
+        throw error;
       }

63-71: Avoid manual query string concatenation; use URL to set api-version once.

Prevents duplicate api-version and handles existing params safely.

Apply this diff:

-      const config = {
+      const config = {
         url: url || `${this._baseUrl()}${path}`,
         headers: this._headers(useOAuth),
         ...otherArgs,
       };
-      config.url += config.url.includes("?")
-        ? "&"
-        : "?";
-      config.url += `api-version=${API_VERSION}`;
+      const u = new URL(config.url);
+      if (!u.searchParams.has("api-version")) {
+        u.searchParams.set("api-version", API_VERSION);
+      }
+      config.url = u.toString();

54-66: Consider a request timeout.

Guard external calls to avoid hanging on network issues (e.g., 10s).

Apply this diff:

       const config = {
         url: url || `${this._baseUrl()}${path}`,
         headers: this._headers(useOAuth),
+        timeout: 10_000,
         ...otherArgs,
       };

4-4: Update API version to 7.1.

The Service Hooks Event Types APIs and docs reference 7.1; upgrading improves compatibility while keeping response shape (id/name/value) stable. Validate Accounts list with 7.x as well. (learn.microsoft.com)

Apply this diff and smoke test the dropdown:

-const API_VERSION = "5.0";
+const API_VERSION = "7.1";

23-26: Return label/value objects for Event Type options.

Improves UX and avoids blank entries if UI expects objects. The API returns id and name for each event type. (learn.microsoft.com)

Apply this diff:

-        const types = await this.listEventTypes(organization);
-        return types?.map((type) => type.id);
+        const types = await this.listEventTypes(organization);
+        return types?.map((type) => ({
+          label: type.name || type.id,
+          value: type.id,
+        }));
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6b99c9 and 53df08d.

📒 Files selected for processing (3)
  • components/azure_devops/azure_devops.app.mjs (2 hunks)
  • components/azure_devops/package.json (1 hunks)
  • components/azure_devops/sources/new-event/new-event.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Ensure component commits modify component versions
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (4)
components/azure_devops/package.json (1)

3-3: Version bump looks good.

No concerns on publishing 0.1.1.

Before merge, confirm the package gets published after this PR lands.

components/azure_devops/sources/new-event/new-event.mjs (1)

5-5: Source version bump is fine.

No functional changes here.

Please validate in the UI that the Event Type dropdown now renders options for an org with an invalid PAT (expect a clear config error vs. empty options).

components/azure_devops/azure_devops.app.mjs (2)

71-78: Good: user-friendly 401 handling for PAT.

Catches a common misconfig and surfaces a clear ConfigurationError.


88-94: Confirm this fixes Issue #15414 (empty Event Type options)

listEventTypes returns response.value and options map to type.id — verify by capturing the raw payload to ensure each item includes id (and name).

Location: components/azure_devops/azure_devops.app.mjs — options ~lines 22–26; listEventTypes ~lines 88–94.

@vunguyenhung vunguyenhung merged commit 1bbc9f0 into master Sep 21, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the issue-15414 branch September 21, 2025 05:50
sergio-eliot-rodriguez pushed a commit to sergio-eliot-rodriguez/sergio_wong_does_pipedream that referenced this pull request Sep 21, 2025
vunguyenhung added a commit that referenced this pull request Sep 24, 2025
* Leonardo AI components

* added unzoom image action

* fixing link errors

* more lint fixes

* Merging pull request #18359

* fix: pagination prop and params struct

* fix: no need for paginate here

* chore: update version

* chore: cleanup

* chore: update package

* feat: allow raw response

* chore: bump package

* fix: buffer response instead

* Update components/google_drive/actions/download-file/download-file.mjs

Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>

* versions

* pnpm-lock.yaml

* pnpm-lock.yaml

* pnpm-lock.yaml

* feat: add content selector

* chore: bump package

* fix: comments

* chore: bump versions

* chore: fix versions

* fixes: QA fixes

* feat: add cursor to req

* package.json

---------

Co-authored-by: joao <joao@coform.com>
Co-authored-by: joaocoform <joao@usecoform.com>
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
Co-authored-by: Luan Cazarine <luanhc@gmail.com>

* Merging pull request #18361

* update siteId prop

* pnpm-lock.yaml

* package.json version

* Google Sheets - update row refresh fields  (#18369)

* change prop order and refresh fields

* bump package.json

* Pipedrive - fix app name (#18370)

* use pipedriveApp instead of app

* bump package.json

* Pipedrive - pipelineId integer (#18372)

* pipelineId - integer

* bump versions

* Adding app scaffolding for lightspeed_ecom_c_series

* Adding app scaffolding for financial_data

* Adding app scaffolding for microsoft_authenticator

* Merging pull request #18345

* updates

* versions

* versions

* Merging pull request #18368

* updates

* remove console.log

* versions

* Coinbase Developer Platform - New Wallet Event (#18342)

* new component

* pnpm-lock.yaml

* updates

* updates

* Hubspot - update search-crm (#18360)

* update search-crm

* limit results to one page

* update version

* package.json version

* Merging pull request #18347

* widget props

* fix version

* Adding app scaffolding for rundeck

* Merging pull request #18378

* Update Taiga component with new actions and sources

- Bump version to 0.1.0 in package.json and add dependency on @pipedream/platform.
- Introduce new actions for creating, updating, and deleting issues, tasks, and user stories.
- Add sources for tracking changes and deletions of issues and tasks.
- Implement utility functions for parsing and cleaning objects in common/utils.mjs.
- Enhance prop definitions for better integration with Taiga API.

* pnpm update

* Refactor Taiga actions to utilize parseObject utility

- Added parseObject utility for tags, watchers, and points in update-issue, update-task, and update-userstory actions.
- Removed the update-project action as it is no longer needed.
- Enhanced base source to include secret key validation for webhook security.

* Merging pull request #18382

* add testSources prop

* pnpm-lock.yaml

* fix

* Merging pull request #18323

* Added actions

* Added actions

* Added actions

* Merging pull request #18377

* Added actions

* Update components/weaviate/actions/create-class/create-class.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Luan Cazarine <luanhc@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Merging pull request #18376

* Adding app scaffolding for etrusted

* Adding app scaffolding for intelliflo_office

* Adding app scaffolding for thoughtspot

* Adding app scaffolding for kordiam

* Adding app scaffolding for ticketsauce

* trustpilot fixes (#18152)

* trustpilot fixes

* more fixes

* update versions

* more version updates

* fixes

* Bump all Trustpilot actions to version 0.1.0

Major improvements and API updates across all actions:
- Enhanced private API support with proper authentication
- Improved parameter handling and validation
- Better error handling and response structures
- Added new conversation flow for product reviews
- Fixed endpoint URLs to match latest API documentation
- Streamlined request/response processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* up version and clean up sources

* merge

* fix business ID

* delete temp action

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* comments

* Pagination

* fixes

* comments

* missed some `$`'s

* unduplicated

* more fixes

* final comments

* more comments

* .

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Adding app scaffolding for peekalink

* 18314 twilio (#18350)

* Update Twilio component versions and dependencies

- Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic.
- Incremented action versions for several Twilio actions.

* pnpm update

* Updating LinkedIn API version (#18399)

* Merging pull request #18394

* Databricks API - Jobs action components (#18371)

* Notion property building improvements (#18381)

* validate property types

* versions

* Google Business - add debug log (#18407)

* add debug log

* bump versions

* Notion API Key - update @pipedream/notion version (#18409)

* update @pipedream/notion dependency version

* pnpm-lock.yaml

* Adding app scaffolding for reduct_video

* Adding app scaffolding for shopware

* Adding app scaffolding for instamojo

* Hubspot - bug fix to sources w/ property changes (#18379)

* updates

* versions

* Google sheets type fix (#18411)

* Fixing worksheetId prop type from string to integer

* Version bumps

---------

Co-authored-by: Leo Vu <vunguyenhung@outlook.com>

* Merging pull request #18393

* new components

* remove console.log

* versions

* update

* Merging pull request #18408

* 403 error message

* versions

* update

* Merging pull request #18419

* Changes per PR Review

* Removes leonardo_ai_actions.mdc not indented for merging

* synced lockfile after install

* fully lock form-data for leonardo_ai

* conflict solving

* lint fixes

* Chipped down Readme, implemented async options in gen motion

---------

Co-authored-by: jocarino <45713006+jocarino@users.noreply.github.com>
Co-authored-by: joao <joao@coform.com>
Co-authored-by: joaocoform <joao@usecoform.com>
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
Co-authored-by: Luan Cazarine <luanhc@gmail.com>
Co-authored-by: michelle0927 <michelle0927@users.noreply.github.com>
Co-authored-by: Andrew Chuang <andrewjschuang@gmail.com>
Co-authored-by: danhsiung <35384182+danhsiung@users.noreply.github.com>
Co-authored-by: Lucas Caresia <lucascarezia@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Job <9075380+Afstkla@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Guilherme Falcão <48412907+GTFalcao@users.noreply.github.com>
Co-authored-by: Leo Vu <vunguyenhung@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Azure Dev Ops
3 participants