.GetResults() seems to have been used as an attempted await, but does not function that way. Replaced with .get() which does.
The original author considered it a failure state if the database already existed. They had set FailIfExists on the copy function, which is correct if you don't want to overwrite, but then they were returning without loading the database at all if that error fired. Replaced with a check for the error thrown by FailIfExists, which is ignored, while retaining error-checking for other types of failures (although I don't know what those would be).
Explanation
The issue stemmed from two separate places.
.GetResults()
seems to have been used as an attemptedawait
, but does not function that way. Replaced with.get()
which does.FailIfExists
on the copy function, which is correct if you don't want to overwrite, but then they were returning without loading the database at all if that error fired. Replaced with a check for the error thrown byFailIfExists
, which is ignored, while retaining error-checking for other types of failures (although I don't know what those would be).Resolutions
resolves #519, resolves #491, resolves #487, resolves #451