Skip to content

[Produce] Put explicit error when a mandatory field is not present in the dataset #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AlexisSouquiere opened this issue Apr 29, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@AlexisSouquiere
Copy link
Collaborator

Problem

When producing a message, an enrich phase is performed to be able to produce a compliant message. It adds for instance "field": null on union-nullable fields that are not given in the message. When a mandatory field is missing, the user get an error such as:

Produce failed due to the following error: java.lang.NullPointerException: Cannot invoke "java.util.List.forEach(java.util.function.Consumer)" because the return value of "java.util.Map.get(Object)" is null

User is blocked and can't know that a field is missing.

Suggestion

Add a clear message indicating that a field is missing like: Produce failed due to the following error: Mandotory field <field> is missing. Please check the schema to fix the dataset

Alternatives Considered

N/A

Additional Context

N/A

@AlexisSouquiere AlexisSouquiere added the enhancement New feature or request label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant