Skip to content

Fix crash on schema invalid files#568

Merged
simon-20 merged 6 commits into
developfrom
fix_crash_on_schema_invalid_files
May 20, 2025
Merged

Fix crash on schema invalid files#568
simon-20 merged 6 commits into
developfrom
fix_crash_on_schema_invalid_files

Conversation

@simon-20
Copy link
Copy Markdown
Contributor

Resolves #567

@simon-20 simon-20 requested a review from a team May 15, 2025 13:23
@jarofgreen
Copy link
Copy Markdown
Contributor

Where did the comma at the end of each line come from and are we sure that's ok?

Is there a risk that other types of errors might be thrown by libxml.parseXml, specifically ones that don't have line attribute? (Tho a slightly off error message is better than a crash).

A test would be a good bonus.

@simon-20
Copy link
Copy Markdown
Contributor Author

Where did the comma at the end of each line come from and are we sure that's ok?

The linter.

Is there a risk that other types of errors might be thrown by libxml.parseXml, specifically ones that don't have line attribute? (Tho a slightly off error message is better than a crash).

A test would be a good bonus.

I'll add a check for existence of error.line and a test.

Comment thread integration-tests/js-validator-api-tests.postman_collection.json Outdated
Comment thread integration-tests/js-validator-api-tests.postman_collection.json Outdated
Comment thread services/rulesValidator.js
@simon-20 simon-20 merged commit deaa2ab into develop May 20, 2025
3 checks passed
@simon-20 simon-20 deleted the fix_crash_on_schema_invalid_files branch May 20, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validator crashes with 500 Server Error when given a schema-invalid iati-organisations file

2 participants