Company form submission during onboarding fails
Summary
It seems that when SSO registration is used and we fill out the company form, that sometimes the user does not have a last name. The absence of the last name is currently not allowed when submitting a trial lead to customersDot and that is what the company form submission is.
This in turn causes customersDot to return a false result with no message and bounces us back to the company form again with no message.
Current flow
- User registers with SSO on GitLab.com, and they don't have a last name with their SSO provider.
- User picks a flow that puts them into a company form with trial lead submission (trial/for company -
ee/spec/features/registrations/saas/trial_flow_company_creating_project_spec.rb
for instance) - User then submits the company form.
- That calls our lead creation service which then reaches out to customersDot.
- On CustomersDot, this valid check returns false due to the validation check on last_name.
-
❌ we should see if last name validation can be removed or perhaps filled out with a placeholder.- filling it out properly from user entry !124628 (merged)
-
- CustomersDot returns back the result without any error message, just a 422.
-
❌ it would be nice to send a message back here.- it does send it back as desired, merely a regression that broke the observance of it - !124772 (merged)
-
- GitLab then processes that result and sends back the response with error message(if exists).
- This then renders back the form with a flash of the error to the user. Since there is no error message provided from CustomersDot, the flash never appears.
-
❌ perhaps we should handle the nil case for message and show something generic, even if we add messages for this one error.- handle nil case !123983 (merged)
- improve error logging !124777 (merged)
-
Solution
Solve for the
Edited by Doug Stull