Skip to content

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

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

Closed
kim-tsao opened this issue Aug 26, 2021 · 0 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@kim-tsao
Copy link
Contributor

kim-tsao commented Aug 26, 2021

/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant