Skip to content

Improve error handling in validation so distinct error types are returned for verification #598

@kim-tsao

Description

@kim-tsao

/kind bug

Which area this bug is related to?

/area library

Bug Summary

Describe the bug:

Project validation is the only component that does not have it's own error type in errors.go. The error messages are currently constructed as strings which makes it difficult to verify error types when testing the negative path.

Also, the ValidateDevfileData function returns a concatenation of error strings. We should switch to returning a multierror which was recently introduced in #577
scratch this, I didn't have the latest changes in my local repo

To Reproduce:

Expected behavior

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.

Additional context

Any workaround?

Suggestion on how to fix the bug

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions