hypothesis / lti

Hypothesis LTI app (Canvas)
Apache License 2.0
0 stars 1 forks source link

Speed Grader export view crashes if student didn't enter Hypothesis username when they submitted #90

Open seanh opened 7 years ago

seanh commented 7 years ago

When a student submits their assignment, it's possible for them to leave their Hypothesis username field empty but still click submit. If they do that then the export link that we add to the Speed Grader crashes when the teacher tries to view their submission.

https://sentry.io/hypothesis/lti/issues/337345620/

KeyError: 'user'
(2 additional frame(s) were not displayed)
...
  File "pyramid/view.py", line 642, in _call_view
    response = view_callable(context, request)
  File "newrelic/hooks/framework_pyramid.py", line 88, in view_handler_wrapper
    return wrapped(*args, **kwargs)
  File "pyramid/viewderivers.py", line 410, in viewresult_to_response
    result = view(context, request)
  File "pyramid/viewderivers.py", line 148, in _requestonly_view
    response = view(request)
  File "lti/views/export.py", line 23, in lti_export
    user = parsed_args['user'][0]

KeyError: 'user'
jeremydean commented 7 years ago

Should we worry too much about these errors given that this whole submission process will be automated through a synced Canvas-Hypothesis identity in the long term?