Closed ahayes closed 11 months ago
More areas that used getString and relied on the original behaviour of returning null from getString. Some of these were changed to optString(<key>
, null) because the code was written to rely on the fact that it could get null as a returned value.
There are still instances that use getString (but whether those areas rely on whether or not null is returned is not certain), but they are not changed because they are already in a try catch or it may be better to just fail in order to indicate that something is very wrong (ex. a document missing the "_id" property) as opposed to optString returning null which may continue code execution for a while, making the source of failure possibly harder to find.
This was a regression from https://github.com/GCRC/nunaliit/pull/1188 and should be fixed in https://github.com/GCRC/nunaliit/pull/1191
After upgrading an atlas to the latest
nunaliit_2.2.9-SNAPSHOT_2023-09-20_1e270a1
build, visiting an atlas with the submission database enabled results in an error dialog pop-up "Unable to initialize submission database". The browser console reports "Unable to initialize submission server Error obtaining database welcome: error nunaliit2.js:233:634".Clicking through the error results in the module appearing to load and function as expected. Reloading the page causes the error to reappear. The error stops appearing once logged in to Nunaliit.
I suspect one of the recent server-side changes.