<unprintable InsufficientSpecificationError object>

Description

TracedError reported from New Relic
Application: prod-edx-edxapp-lms
https://rpm.newrelic.com/accounts/88178/applications/3343327/traced_errors/3011550216

Timestamp: February 11, 2015 09:07
Exception Class: xmodule.modulestore.exceptions:InsufficientSpecificationError
Error Action: /contentserver.middleware:StaticContentServer.process_request
Uri: /c4x/edX/Art101/asset/expand-arrow.png

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Activity

Show:
Zubair Afzal
March 10, 2015, 10:53 AM
Julia Eskew
February 12, 2015, 4:45 PM

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.

Zubair Afzal
February 12, 2015, 2:48 PM

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?

Fixed

Assignee

Zubair Afzal

Reporter

New Relic

Labels

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 &amp; 2)

None

Platform Map Area (Levels 3 &amp; 4)

None

Priority

CAT-3