<unprintable InsufficientSpecificationError object>
TracedError reported from New Relic
Timestamp: February 11, 2015 09:07
Exception Class: xmodule.modulestore.exceptions:InsufficientSpecificationError
Error Action: /contentserver.middleware:StaticContentServer.process_request
Steps to Reproduce
Reason for Variance
User Impact Summary
Thanks for your investigation - it was helpful.
The best way to fix this would be to catch the InsufficientSpecificationError and VersionConflictError exceptions thrown by split.py:_lookup_course() in the split.py:_find_course_assets() method - logging the error and returning an empty dict. This fix would encapsulate those errors within the Split modulestore - they aren't relevant to other modulestores. And a 404 error would be generated.
Both of the issues [TNL-1426, TNL-1425] started occurring at same time
This issue started occurring because the course author tried to add "Syllabus Template" in a course on Prod which includes asset from a different course Art101 that exists only on Prod-Edge so server should return 404.
But I believe the default "MongoModuleStore" on Prod is changed to "SplitMongoModuleStore" so when user tries to get an asset for a course which don't exist then "_find_course_assets" method of "SplitMongoModuleStore" is called and "_lookup_course" method of split raise InsufficientSpecificationError when course_key don't have 'version_guid', thats why user is getting 500 instead of 404.
should we catch InsufficientSpecificationError exception in contentserver middleware to return 404?