TinCanJS icon indicating copy to clipboard operation
TinCanJS copied to clipboard

Catch error when neither auth or username and password LRS properties are set

Open garemoko opened this issue 7 years ago • 3 comments

Currently, if you don't specify either auth or username and password config properties (maybe you specify key and secret by mistake) and then try to make a request (e.g. send a statement) the error you get in node is one that comes from the xhr2 library complaining that your trying ton convert a null property (the auth header value) toString.

It would be 'nice to have' for TinCanJS to catch the error further up the chain with a message that you tried to make a request when the LRS auth is null and to check that either auth or username and password are set.

garemoko avatar Nov 28 '17 10:11 garemoko