Custom Prompts Error "The data you submitted is too long"

Problem statement

The Customer receives the below error when trying to submit a login page with custom prompts.

The data you submitted is too long

Cause

There is too much data included in the request.

Solution

There is a server-side limit of ~6000 characters for the total user-submitted data (including the field keys and the object it is stored in). For flows with multiple prompts, this limit is for the total of user-submitted data. For example, if the user inputs 5000 characters in prompt 1, then 2000 characters in prompt 2, they will see a The data you submitted is too long when submitting prompt 2.