Open alanb2718 opened 3 months ago
I tried replacing this line
return console.log('TODO show error dialog', error.message);
with
throw new Error('unhandled exception: ' + error.message);
Then the unit tests fail as expected. I'm not sure if this is the best way to handle this case, but it does at least catch the error properly.
Also, setting a breakpoint and inspecting the error turns this up:
cause = TypeError: Invalid URL: //api/v1/auth/token\n
The handleErrors method in the ApiClientWrapper has a line at the end of the method for errors that weren't handled earlier:
return console.log('TODO show error dialog', error.message);
This is https://github.com/bmlt-enabled/bmlt-root-server/blob/main/src/resources/js/lib/RootServerApi.ts#L291Change this to handle the error properly and raise an exception. Right now there are a couple of unit test bugs (#995 and #999) that were difficult to notice because the test just printed an error message rather than failing.