-
Notifications
You must be signed in to change notification settings - Fork 73
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
Protect against buggy participants reports from Aalto SISU API #1181
Conversation
98bb794
to
f9e795d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of change proposal related to logging. What do you think?
I made the suggested changes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! I have one preference, though. I like to include a bit more background in the git commit message. If there is only a link to the issue, then you have to open the issue to remember what the problem really was.
I will merge this now.
Description
What?
It has turned out that Aalto's SISU API gateway occasionally returns an empty list for all courses queried using this API because of some malfunction. This causes all students to be removed from course enrollments (and a major hassle as a result). Therefore we have now added a check to the code to protect against this situation: if the response contains an empty participant list, it is ignored.
Additionally, the error handling now reports the error code more clearly in logs.
Fixes #1180
Testing
What type of test did you run?
This fix was not tested, because of the difficulty of doing that, but I assume there are no problems.
Did you test the changes in
Programming style
Have you updated the README or other relevant documentation?
Is it Done?