-
Notifications
You must be signed in to change notification settings - Fork 94
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
Invalid LTI consumer response may result in empty error #79
Comments
Funny, I think I just started running into this same problem. So are the grades sent back correctly? What does the error actually indicate? |
@lastmjs In my specific case, the LTI provider (which uses this library) sends the grades to the LTI consumer (which is another application that we control). The LTI consumer can extract the grade from the XML, but it doesn't bother with a valid LTI response (since both applications are only used internally). A valid response would be something like "got it, score recorded" (The actual response is detailed in the LTI specification of course). But it's conceivable that you could get |
Looks like my error was coming from the server returning a 500 response. A more helpful error message would have been very valuable |
Code
Actual outcome
$ node test.js Encountered an error while sending result: { [Error] message: undefined }
Expected outcome
Maybe a more helpful error message?
Cause
After debugging the program, it looks like the XML parser does not throw an error. But the code from the response is
undefined
(since the XML is empty), so the library assumes there was a non-success code and tries to throw an error using the message in the XML. But, again, there is nothing in the XML. Somsg === undefined
ims-lti/src/extensions/outcomes.coffee
Line 213 in 4df2936
The text was updated successfully, but these errors were encountered: