Skip to main content
When you call client.start() or render FormFilling, the SDK loads the Form filling interface inside an iframe in your app. If an error occurs while loading or during the session, the SDK returns a SukiFormFillingError. start() does not throw errors directly. Instead, handle errors using the onError callback, the form-filling:error event, or, in React, the error value returned by useFormFilling(). Some problems do not emit an error code at all. The container may look empty if it has no height, if CSP blocks the iframe, or if partner credentials are invalid. For those cases, see Blank UI with no error code below.
After most errors, the SDK removes the iframe and the clinician may need to open Form filling UI again.

Choose the right error event

Each error reaches onError and form-filling:error listeners. Pick one pattern unless you need both. Refer to the Error handling example for React and JavaScript code.

Form filling SDK error codes

JavaScript

SUKI_FF_004 messages

When the SDK returns SUKI_FF_004, the reason is always iframe-runtime. The message field provides more detail about what failed and may contain one of the following values:
  • Failed to start form filling session..
  • Failed to submit form filling session..
  • Form generation failed..
Use code and reason to identify the error in your application. Use message only to display information to users or to include in logs.

Troubleshooting Form filling issues

If Form filling does not load or is not working as expected, check these common issues in order:
  1. Verify that the container has a height. See Blank UI below.
  2. Verify that your forms (or form_template_ids when forms is omitted) resolve to at least one valid entry. See Template and form issues below.
  3. Verify that partnerId and partnerToken are configured correctly through SukiAuthManager.
  4. Verify that your Content Security Policy (CSP) allows the SDK iframe and that your app is running over HTTPS so microphone access is available.

Blank UI with no error code

If the Form filling interface does not appear and onError is never called, the iframe most likely did not become visible. This is usually caused by a layout or container sizing issue rather than a problem with the Form filling session itself.

Checking container height

The SDK appends a full-size iframe to your container. If the container has zero height, the iframe loads but you see a blank area. In JavaScript, set height on the element you pass as rootElement:
HTML
In React, style the wrapper FormFilling renders:
CSS
Refer to Configuration for container sizing.

Checking CSP

Form filling runs in an iframe from Suki’s SDK host. If your app’s Content-Security-Policy header blocks that origin in frame-src, the iframe cannot load. You may see a blank container or SUKI_FF_002 (handshake-timeout).

Checking partner credentials

Form filling does not open until SukiAuthManager sign-in succeeds with a valid partnerId and partnerToken. If credentials are wrong or expired, the Form filling interface may never appear and you may not receive an SDK error code. Refer to Authentication and Partner onboarding to get your credentials.

Checking HTTPS and microphone

Run Form filling on HTTPS. The browser requires a secure context for microphone access.

Template and form issues

Before the iframe opens, FormFillingClient.start() resolves forms (or form_template_ids when forms is omitted) and validates static IDs against Suki’s medical form template catalogue.
  • Prefer forms. When forms is provided, form_template_ids is ignored.
  • Template IDs are different for staging and production environments.
  • Unsupported static IDs are dropped before the UI opens. Valid dynamic schema entries stay in the session.
  • If no forms remain after validation, the SDK emits SUKI_FF_001 (empty-template-ids or unsupported-template-ids) and does not open the UI.
  • Invalid XOR entries or duplicate IDs fail before the network with invalid-form-entry or duplicate-form-id.
Contact Suki’s Support team to confirm staging and production template_id values. Refer to Form filling templates for supported assessment types and Dynamic Form filling for partner schemas.

Handling normal session outcomes

Some session outcomes are normal and do not emit SukiFormFillingError: In these cases, the SDK does not return an error code. To deal with these scenarios, check the structured_data.non_generated_values field in the FormFillingResult object returned by the onSubmit callback. Refer to Session workflow for processing, cancel, and webhook delivery.

Next steps

Error handling example - React and JavaScript UI patterns. Events - form-filling:error payload details. Prerequisites - CSP, webhooks, and template setup.
Last modified on October 16, 2026