tl-its-umich-edu / my-learning-analytics

My Learning Analytics (MyLA)
Apache License 2.0
36 stars 39 forks source link

issue #1540 issue_1540 empty error message was returned when student invokes MyLA before fully setup #1561

Closed zqian closed 5 months ago

jonespm commented 5 months ago

This seems to work but I wonder if the error is further up in the handleError method having an exception!

image

Checking for an empty string seems like it could catch the wrong error. I have a fix for this on this commit which works to return 404 if "Not Found" isn't available in the statusText.

https://github.com/tl-its-umich-edu/my-learning-analytics/commit/61a2f9990f84df279ee83d86730691851fad0be1

zqian commented 5 months ago

@jonespm I have tested your changes, and it is working as expected. I think yours is a better approach with both statusText and statusCode handlings. Please go ahead and merge your changes instead