fix(api-service,dashboard): fix 4 production Sentry errors across API and dashboard#10292
Merged
fix(api-service,dashboard): fix 4 production Sentry errors across API and dashboard#10292
Conversation
Fixes DASHBOARD-26W: escapeString receives non-string param (e.g. number) from filter params, causing TypeError: e.replace is not a function. Coerce param to string before calling .replace(). Co-authored-by: Dima Grossman <dima@grossman.io>
Fixes DASHBOARD-2CX: options[hoveredOptionIndex] can be undefined when the options array shrinks while hoveredOptionIndex still references a stale index. Add bounds check before accessing the array. Co-authored-by: Dima Grossman <dima@grossman.io>
…heck Fixes API-QG: activeChannelsStatus[stepType] is undefined for step types like THROTTLE and HTTP_REQUEST that are not in ChannelTypeEnum. Instead of maintaining an exhaustive skip list, check if the step type exists in the channel status map as a fallback guard. Co-authored-by: Dima Grossman <dima@grossman.io>
…ompilation Fixes API-GE: Cannot create property 'content' on string. When the content array for editor mode contains primitive values (strings) instead of IEmailBlock objects, the mutation fails. Skip non-object entries. Co-authored-by: Dima Grossman <dima@grossman.io>
✅ Deploy preview added
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Hey there and thank you for opening this pull request! 👋 We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted. Your PR title is: Requirements:
Expected format: Details: PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Fixes 4 production Sentry errors identified during automated error investigation:
DASHBOARD-26W (39 events, 3 users) —
TypeError: e.replace is not a functionRoot cause:
escapeString()in variable utils receives a non-string param (e.g. number) from filter params. The.replace()method doesn't exist on non-string types.Fix: Coerce param to string via
String(str)before calling.replace().DASHBOARD-2CX (3 events, 3 users) —
TypeError: Cannot read properties of undefined (reading 'value')Root cause: In
variable-list.tsx,hoveredOptionIndexcan reference a stale index when theoptionsarray shrinks (e.g. from filtering), causingoptions[hoveredOptionIndex]to beundefined.Fix: Add bounds check
hoveredOptionIndex < options.lengthbefore accessing the array.API-QG (1 event, new) —
TypeError: Cannot read properties of undefined (reading 'hasActiveIntegrations')Root cause:
handleStepsinGetActiveIntegrationsStatusskips DELAY, DIGEST, TRIGGER, CUSTOM step types but doesn't handle newer step types like THROTTLE and HTTP_REQUEST that aren't inChannelTypeEnum. Looking upactiveChannelsStatus[stepType]for these returnsundefined.Fix: Add a fallback guard
!activeChannelsStatus[stepType]to the skip condition, so any step type without a channel mapping is automatically skipped.API-GE (148 events) —
TypeError: Cannot create property 'content' on string 'H'Root cause: In
CompileEmailTemplate, the editor-mode loop iterates overcontentexpectingIEmailBlock[]objects, but some elements are primitive strings. Trying to assignblock.content = ...on a string fails.Fix: Skip non-object entries in the content iteration with
typeof block !== 'object' || block === null.