Skip to content

FOUR-30920: Remove expected DevLink ping 401#8897

Open
eiresendez wants to merge 1 commit into
developfrom
bugfix/FOUR-30920
Open

FOUR-30920: Remove expected DevLink ping 401#8897
eiresendez wants to merge 1 commit into
developfrom
bugfix/FOUR-30920

Conversation

@eiresendez

@eiresendez eiresendez commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Creating a new DevLink currently stores the local DevLink record and then calls GET /api/1.0/devlink/{id}/ping before OAuth has completed. Because the DevLink does not have a usable access token yet, the ping returns a browser-visible 401 even though the flow is expected to continue to the remote OAuth/login step.

To reproduce:

  1. Log in as an admin.
  2. Go to Admin > DevLink.
  3. Create a new DevLink using a local or remote ProcessMaker URL.
  4. Observe that the flow redirects to OAuth/login correctly, but the browser console/network panel shows a 401 for the ping request.

Solution

  • Normalize DevLink ping responses into semantic statuses: ok, authorization_required, or error.
  • Return HTTP 200 for expected remote authorization failures so the browser no longer shows a false 401 during the happy path.
  • Update the Create DevLink flow to redirect for ok and authorization_required, and show the existing error state only for real failures.
  • Add focused API coverage for successful ping, unauthorized/forbidden remote responses, server failure, and connection failure.

How to Test

  • vendor/bin/phpunit tests/Feature/Api/DevLinkTest.php --filter Ping
  • vendor/bin/phpunit tests/Feature/Api/DevLinkTest.php
  • npm run development

Manual check:

  1. Create a new DevLink.
  2. Confirm the flow still redirects to the remote OAuth/login step.
  3. Confirm the local ping request no longer returns a browser-visible 401 during the expected pre-authorization path.

Related Tickets & Packages

ci:deploy

@processmaker-sonarqube

Copy link
Copy Markdown

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://ci-09ba128f9d.engk8s.processmaker.net

@eiresendez eiresendez requested a review from CarliPinell July 9, 2026 19:19
@eiresendez eiresendez self-assigned this Jul 9, 2026

@CarliPinell CarliPinell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved.
No observations found

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.

3 participants