Developer fixes null-body crash in Formbricks survey SDK flagged by Sentry

A production crash in the Formbricks open-source survey SDK was automatically detected and reported by Sentry as issue FORMBRICKS-CLOUD-3VE. The bug caused an uncaught TypeError in visitors' browsers when the SDK's makeRequest helper attempted to read properties off a null HTTP response body. The same flaw existed in two separate packages — @formbricks/js-core and @formbricks/surveys — leaving the error path entirely unguarded against null or non-JSON responses. Developer Lewis Awe patched both instances by wrapping response.json() calls to handle SyntaxErrors and adding null-safe checks before accessing response properties. Because Formbricks does not accept unsolicited community pull requests, the fix was opened and merged on a personal fork as part of DEV's Summer Bug Smash challenge powered by Sentry.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in