Skip to content

Commit fbf9624

Browse files
Add error handling to Koala identify call
- Wrap ko.identify() in try-catch block to prevent script errors - Ensures newsletter signup flow is never blocked by tracking failures - Logs warning to console if Koala identify fails - Maintains robust user experience with graceful degradation Co-Authored-By: Alek <[email protected]>
1 parent 88d9b44 commit fbf9624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pcweb/signup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ def signup(
101101
self.add_contact_to_loops(email)
102102
self.signed_up = True
103103
return [
104-
rx.call_script(f"ko.identify('{email}')"),
104+
rx.call_script(f"try {{ ko.identify('{email}'); }} catch(e) {{ console.warn('Koala identify failed:', e); }}"),
105105
rx.toast.success("Thanks for signing up to the Newsletter!")
106106
]

0 commit comments

Comments
 (0)