Skip to content

Propagate validation errors instead of boolean return value #259

@Pfeil

Description

@Pfeil

In order to account for simplification, we often use validation on a true/false basis. But I think that sometimes it may be useful to get a list of error messages. As a first step, we should propagate these errors at least in classes such as JsonSchemaValidation. Instead of a boolean, we could return an Optional or so. The boolean style checks can then still performed like boolean isValid = errors.isEmpty() or so. We can then consider in each place this is used how to handle this information. In some parts the boolean logic is likely ok and enough, in others it may make sense to have handling code or provide it to the caller (and possibly to the user, especially when it comes to creating crates).

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