Skip to content

Fix helper in engine's error handler#2287

Merged
ravikiranvm merged 1 commit into
mainfrom
ops-4255b
May 12, 2026
Merged

Fix helper in engine's error handler#2287
ravikiranvm merged 1 commit into
mainfrom
ops-4255b

Conversation

@ravikiranvm
Copy link
Copy Markdown
Contributor

Fixes OPS-4255.

Additional Notes

@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

OPS-4255

@ravikiranvm ravikiranvm marked this pull request as ready for review May 12, 2026 14:16
Copilot AI review requested due to automatic review settings May 12, 2026 14:16
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the engine’s error-handling helper by replacing the previous object-shape checks (via isObject) with more robust, realm-agnostic typeof ... === 'object' + null checks when detecting HTTP-like errors (used for Azure 429 retry metadata).

Changes:

  • Removed the isObject import and dependency from @openops/shared in this helper.
  • Updated isHttpErrorLike to use explicit runtime type guards for error.response and response.status.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,6 +1,6 @@
import { SharedSystemProp, system } from '@openops/server-shared';
import type { StepRetryMetadata } from '@openops/shared';
import { ActionType, BlockAction, CodeAction, isObject } from '@openops/shared';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I used this existing isObject shared helper func and later didn't test the behaviour locally. Now when I tested it, I've observed that for our use-case this helper is not helpful. We need to check for a class instance and not a plain objct.

@ravikiranvm ravikiranvm merged commit e19546f into main May 12, 2026
25 checks passed
@ravikiranvm ravikiranvm deleted the ops-4255b branch May 12, 2026 14:43
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