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

fix: module indent can be negative #11

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

jonas-w
Copy link
Contributor

@jonas-w jonas-w commented Nov 12, 2024

Synchronization of a course failed, as a module contained a negative indentation (-1) on the WebSite it looks like the indentation 1, but edu-sync doesn't do anything with the indent, so it's not that important.

Fixes #10

@jonas-w
Copy link
Contributor Author

jonas-w commented Nov 12, 2024

I think it might be useful to print the error with https://crates.io/crates/serde_path_to_error as it was easier to tell what the issue was with using this crate. Otherwise it only printed to whole json response, and that it didn't match the Enum. Which isn't useful at all.

@mkroening mkroening self-assigned this Nov 12, 2024
Copy link
Owner

@mkroening mkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There have been similar issues in the past due to our strong types and some moodle instances not matching the docs.

I think it might be useful to print the error with https://crates.io/crates/serde_path_to_error as it was easier to tell what the issue was with using this crate. Otherwise it only printed to whole json response, and that it didn't match the Enum. Which isn't useful at all.

Sounds good! Would you like to tackle this or open an issue? If you'd like to work on this soon, I'd wait with a release containing this fix.

@jonas-w
Copy link
Contributor Author

jonas-w commented Nov 12, 2024

@mkroening will take a look at it today, when I debugged it I didn't implement it perfectly, so I'll see what I can do!

@mkroening mkroening merged commit 647a75f into mkroening:main Nov 12, 2024
4 checks passed
@mkroening
Copy link
Owner

@mkroening will take a look at it today, when I debugged it I didn't implement it perfectly, so I'll see what I can do!

Awesome, thanks! :)

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.

edu-sync-cli Crash Report
2 participants