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

Further improve netkan relationship error message #4021

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

HebaruSan
Copy link
Member

Motivation

#4020 replaced the very unclear "Specified cast is not valid" message with a proper schema validation error. On further consideration, the schema error still isn't clear enough, because it doesn't explain why the array item is not valid.

1717 [1] FATAL CKAN.NetKAN.Program (null) - Schema validation failed: #/depends[0]: ArrayItemNotValid, #/depends[1]: ArrayItemNotValid, #/depends[2]: ArrayItemNotValid, #/supports[0]: ArrayItemNotValid, #/supports[1]: ArrayItemNotValid

Changes

Now the RelationshipsValidator explicitly checks the type of the elements of relationships arrays and prints a message that hopefully will be clearer:

$ netkan.exe NetKAN/kOS-KerbalEngineer.netkan
507 [1] FATAL CKAN.NetKAN.Program (null) - depends elements should be Object, found String: "KerbalEngineerRedux"

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Netkan Issues affecting the netkan data Relationships Issues affecting depends, recommends, etc. labels Feb 10, 2024
@HebaruSan HebaruSan merged commit 05631a8 into KSP-CKAN:master Feb 10, 2024
8 checks passed
@HebaruSan HebaruSan deleted the fix/netkan-rel-msg-2 branch February 10, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy This is easy to fix Enhancement New features or functionality Netkan Issues affecting the netkan data Relationships Issues affecting depends, recommends, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant