Devographics / Devographics/Monorepo
[surveyform] saveResponse Issue: Encountered an error while validating client data during update
- Dominant language
- TypeScript
- Stars
- 178
- Forks
- 55
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
⚠️IMPORTANT: please make sure to remove any private data from the “Submitted Data” log⚠️
### Submitted Data:
```
{
"react2023__user_info__age__choices": "range_25_34",
"react2023__user_info__years_of_experience__choices": "range_less_than_1",
"react2023__user_info__company_size__choices": "na",
"react2023__user_info__yearly_salary__choices": "range_50_100",
"react2023__user_info__higher_education_degree__choices": "yes_unrelated",
"react2023__user_info__country": "USA",
"react2023__user_info__gender__choices": "male",
"react2023__user_info__disability_status__choices": [],
"undefined": "",
"lastSavedAt": "2023-07-25T14:06:40.541Z",
"locale": "en-US",
"finishedAt": "2023-07-25T14:06:40.541Z"
}
```
### Location
https://survey.devographics.com/en-US/survey/state-of-react/2023/PabFSWjhZOTkUNGtVCDTh/14
### Timestamp
Tue Jul 25 2023 09:06:43 GMT-0500 (Central Daylight Time)
### Error:
```
{
"id": "client_data_validation_error",
"status": 400,
"message": "Encountered an error while validating client data during update",
"error": {
"issues": [
{
"code": "unrecognized_keys",
"keys": [
"undefined"
],
"path": [],
"message": "Unrecognized key(s) in object: 'undefined'"
}
],
"name": "ZodError"
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Search for the saveResponse update path and the client_data_validation_error handling, then reproduce the request using the submitted payload from the issue. Trace where the unexpected "undefined" key is introduced and add a regression test showing that a valid response update no longer fails validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100