Skip to content

fix(api-service,dashboard): fix 4 production Sentry errors across API and dashboard#10292

Merged
scopsy merged 4 commits intonextfrom
cursor/sentry-error-investigation-8d2b
Mar 15, 2026
Merged

fix(api-service,dashboard): fix 4 production Sentry errors across API and dashboard#10292
scopsy merged 4 commits intonextfrom
cursor/sentry-error-investigation-8d2b

Conversation

@cursor
Copy link
Contributor

@cursor cursor bot commented Mar 14, 2026

What Changed

Fixes 4 production Sentry errors identified during automated error investigation:

DASHBOARD-26W (39 events, 3 users) — TypeError: e.replace is not a function

Root 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, hoveredOptionIndex can reference a stale index when the options array shrinks (e.g. from filtering), causing options[hoveredOptionIndex] to be undefined.
Fix: Add bounds check hoveredOptionIndex < options.length before accessing the array.

API-QG (1 event, new) — TypeError: Cannot read properties of undefined (reading 'hasActiveIntegrations')

Root cause: handleSteps in GetActiveIntegrationsStatus skips DELAY, DIGEST, TRIGGER, CUSTOM step types but doesn't handle newer step types like THROTTLE and HTTP_REQUEST that aren't in ChannelTypeEnum. Looking up activeChannelsStatus[stepType] for these returns undefined.
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 over content expecting IEmailBlock[] objects, but some elements are primitive strings. Trying to assign block.content = ... on a string fails.
Fix: Skip non-object entries in the content iteration with typeof block !== 'object' || block === null.

Open in Web View Automation 

cursoragent and others added 4 commits March 14, 2026 12:09
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>
@netlify
Copy link

netlify bot commented Mar 14, 2026

Deploy preview added

Name Link
🔨 Latest commit d676f7e
🔍 Latest deploy log https://app.netlify.com/projects/dashboard-v2-novu-staging/deploys/69b55032a322280008d0716f
😎 Deploy Preview https://deploy-preview-10292.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
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: fix(api-service,dashboard): fix 4 production Sentry errors across API and dashboard

Requirements:

  1. Follow the Conventional Commits specification
  2. As a team member, include Linear ticket ID at the end: fixes TICKET-ID or include it in your branch name

Expected format: feat(scope): Add fancy new feature fixes NOV-123

Details:

PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name

@scopsy scopsy marked this pull request as ready for review March 15, 2026 09:32
@scopsy scopsy merged commit e89da37 into next Mar 15, 2026
31 checks passed
@scopsy scopsy deleted the cursor/sentry-error-investigation-8d2b branch March 15, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants