Fix helper in engine's error handler#2287
Conversation
|
There was a problem hiding this comment.
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
isObjectimport and dependency from@openops/sharedin this helper. - Updated
isHttpErrorLiketo use explicit runtime type guards forerror.responseandresponse.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'; | |||
There was a problem hiding this comment.
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.



Fixes OPS-4255.
Additional Notes