Skip to content

Add manage a RequestException - #9082

Merged
nolanpro merged 1 commit into
developfrom
FOUR-33503
Sep 30, 2026
Merged

nolanpro merged 1 commit into
developfrom
FOUR-33503

Conversation

@gusys

@gusys gusys commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Describe the issue this ticket solves and describe how to reproduce the issue (please attach any fixtures used to reproduce the issue).

Solution

  • List the changes you've introduced to solve the issue.

How to Test

Describe how to test that this solution works.

Related Tickets & Packages

  • Link to any related FOUR tickets, PRDs, or packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@cursor

cursor Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches core BPMN script failure and retry paths; behavior change is limited to how exceptions are logged after errors, but affects all script task failures.

Overview
Fixes script task failure handling when the runner throws Illuminate\Http\Client\RequestException (e.g. non-2xx HTTP from script executors).

RunScriptTask no longer rebuilds the caught throwable with new $exceptionClass($message), which broke types whose constructors are not message-only. It now logs the original exception when the error-handling message is unchanged, and wraps a generic Exception with the prior throwable as previous when retries change the message (e.g. “failed after N attempts”).

Adds RunScriptTaskTest coverage: a 503 RequestException marks the token failing, records the HTTP error on the request, and respects BPMN error handling by re-queuing RunScriptTask with the configured attempt number and delay instead of failing immediately.

Reviewed by Cursor Bugbot for commit 6b69322. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 63856bd. Configure here.

Comment thread ProcessMaker/Jobs/RunScriptTask.php Outdated
Code improvements
@decisions-sonarqube

Copy link
Copy Markdown

@gusys gusys changed the title Add RequestExecption catch Add manage a RequestException Sep 29, 2026
@nolanpro
nolanpro merged commit 4f86931 into develop Sep 30, 2026
12 of 17 checks passed
@nolanpro
nolanpro deleted the FOUR-33503 branch September 30, 2026 19:01
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.

2 participants