Skip to content
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

Improve metadata file validation #992

Open
mzur opened this issue Nov 28, 2024 · 1 comment
Open

Improve metadata file validation #992

mzur opened this issue Nov 28, 2024 · 1 comment

Comments

@mzur
Copy link
Member

mzur commented Nov 28, 2024

The current volume metadata file validation is performed in two steps. First, the format-specific validation is performed in recognizesFile(). Second, the validation of the parsed metadata is performed.

The first validation step is not implemented very well because a user uploading a malformed file only gets a message "file is not valid". We should implement a mechanism for metadata parsers to return more meaningful error messages for the validation (e.g. "category x is missing the name attribute"). The recognizesFile() method can be replaced with a validate() method that may return a special MetadataValidationException with a message that is passed on to the frontend. Any other exception is handled like an unexpected server error.

@mzur mzur moved this to Medium Priority in BIIGLE Roadmap Nov 28, 2024
@mzur
Copy link
Member Author

mzur commented Nov 28, 2024

The validation is performed here:

The parsers implement it here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Medium Priority
Development

No branches or pull requests

1 participant