Skip to content

Guard createRefCodeLabelLink against null frontendCode#41

Merged
Danswar merged 1 commit into
developfrom
fix/socialmedia-null-frontend-code
Apr 17, 2026
Merged

Guard createRefCodeLabelLink against null frontendCode#41
Danswar merged 1 commit into
developfrom
fix/socialmedia-null-frontend-code

Conversation

@TaprootFreak
Copy link
Copy Markdown

Summary

  • Fixes TypeError: Cannot read properties of null (reading 'toLowerCase') in SocialMediaService that spiked on dfxdev (14:35) and dfxprd (14:39) on 2026-04-17.
  • createRefCodeLabelLink() in socialmedia/socialmedia.helper.ts assumed frontendCode is always a non-null string, but incoming savings updates can carry a null/undefined value.
  • Adds an early return with empty string — consistent with the existing !refCode guard further down.

Test plan

  • Watch Grafana Log Viewer (compose_service=jdm-api, level=error) after merge+deploy — expect the SocialMediaService toLowerCase errors to disappear on both dfxdev and dfxprd.
  • Confirm Telegram/Twitter saving-update messages still render ref-code links for non-null frontendCodes (Juice Wallet, Cake Wallet, generic ref codes).

@TaprootFreak TaprootFreak requested a review from Danswar as a code owner April 17, 2026 14:29
@Danswar Danswar merged commit 3d73a20 into develop Apr 17, 2026
1 check passed
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