Skip to content

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

Description

@AlexisSouquiere

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions