Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Serialization of empty field can create API validation error

Open
#99 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start at models/user_service_human.py lines 81-83 and inspect how UserServiceSetHumanEmail(mail=None) is serialized. Reproduce the request-body behavior with a null email, then verify that unchanged values are not emitted as email: {} and no longer trigger the API validation error.

Written by the indexing model from the issue text.

Description

https://github.com/zitadel/client-python/blob/b89a4b879d84766addbc19d7838f29265a6e5edf/zitadel_client/models/user_service_human.py#L81-L83

This if checks whether self.email is None, but it does not handle the case where self.email is a UserServiceSetHumanEmail(mail=None).

As a result, the serialization produces email: {} in the request body, and the Zitadel API responds with a 400 error because it expects email to be a valid string between 1 and 200 characters, even though it is null and should remain unchanged.

Dominant language
Python
Stars
16
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from zitadel/client-python

All issues in zitadel/client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.