Skip to content

Handling data types in your SDK Hypersyncs

Defining the correct data types in your SDK proof definitions is important.

Previously, certain type mismatch errors, such as these, were ignored by the platform, and your proof is generated with the raw data in the fields regardless of the specified data type:

'1' could not be processed as type Text
'1 July 1970' could not be processed as type Date
False could not be processed as type Text

However, new Hypersyncs will no longer ignore these mismatches. Instead, they will indicate a data type mismatch error. Hypersyncs will remain in a failed state, and proof will not be generated.


Why Is This Happening?

This change is being introduced to enforce stricter type validation, which will help prevent unexpected behavior or data processing issues in your applications. By surfacing these errors, we aim to provide greater transparency and support better debugging practices.


What Do You Need to Do?

To avoid disruptions, we strongly recommend taking the following steps for all of your custom Hypersyncs:

Review and Update Data Types

Ensure that the data types in your proof.json files (e.g., userList.json) are correctly defined to match the expected input.

ex.

{ 
  "property": "firstName",
  "label": "{{messages.LABEL_FIRST_NAME}}",
  "width": "150px",
  "type": "text" 
}

Transform Your Data

Properly transform your data in your datasource.json file to align with the defined types. For detailed guidance on how to transform data using JSONata, please refer to our community knowledge article: Transforming Data in Your SDK Proof Using JSONata

ex.

"last_login_time": "$fromMillis(last_login_time * 1000)"
//this converts epoch milliseconds into text readable dates... while '$toMillis()' converts specific formats back into epoch numbers.

View the logs while generating proof

hp customapps logs --id <yourCustomAppID>

Monitor for any warnings.


Support and Resources

We understand that changes like this may require adjustments to your existing code. Our team is here to support you through this transition. If you have any questions, need assistance with updating your configurations, or encounter issues, please don’t hesitate to reach out for additional resources.