openbaton / NFVO

Repository containing the source code of the NFVO
Apache License 2.0
61 stars 56 forks source link

Error parsing Metadata.yaml should be more descriptive. #236

Closed RuthDevlaeminck closed 6 years ago

RuthDevlaeminck commented 6 years ago

When there are special characters in the Metadata.yaml file the error should tell where the error is. SpecialCharacterError.log

marcellom commented 6 years ago

In the logs I can see: [Request processing failed; nested exception is unacceptable character '' (0x0) special characters are not allowed in "'reader'", position 21]

The error should be at position 21. Did you find which was the character? Seems that the library snakeyaml (https://bitbucket.org/asomov/snakeyaml), that we use for parsing YAML files, does not provide more info than that.

RuthDevlaeminck commented 6 years ago

@marcellom The file had actually gotten corrupted so there was an error in the file. I talked to @lorenzotomasini at the time and he requested that I open a ticket since we couldn't even tell from the error message that the error was in the Metadata.yaml file.

marcellom commented 6 years ago

Ok, I added a message when the error comes from the metadata file. It should fix the issue once https://github.com/openbaton/NFVO/pull/240 is merged.

RuthDevlaeminck commented 6 years ago

Awesome! Thanks.

gc4rella commented 6 years ago

@marcellom @RuthDevlaeminck I've merged it. It should be included in next upcoming minor release. Closing the issue for now.