We are using the method to programmatically register new users. The registration is not done by an administrator.
It is delegated to several persons in the organisation.
They select 1-n entries in a custom database that holds the information for persons to register.
The registration is done by an runOnServer agent when the process owner clicks a button.
This works in general. From time to time, we run into issues where we do not clearly see the reason for the failure.
the registerNewUser method wraps a couple of functions and is some kind of a "blackbox". There are no error specific returncodes that could be used to implement error handling in the surrounding code.
It is an either success or fail situation.
For example. In a recent case, the user.id was not uploaded into the IDVault. The method just returned that something went wrong and the process stopped at this point.
With a proper return code we would be able to create loglines in the custom database for this specific error situation.
The only evidence that something went wrong when uploading the ID was
No ID in IDVault
entries in log.nsf of the executing server
19.05.2021 08:57:34 Error occurred checking key rollover on vault. Vault 'O=myvault'. User 'Hugo Habicht/EXT/ORG/DE'. Error: Your public key was not found in the Domino Directory
19.05.2021 08:57:34 ID failed to upload to vault 'O=myvault'. 'Hugo Habicht/EXT/ORG/DE' (IP Address 555.555.555.555:56219) made request. Error: Access denied for upload to the ID Vault
It turned out that the signature on the LS lib was damaged.
But the log.nsf is not accessible by the process owner. So additional work has to be done to locate the exact cause for the failure.
with proper returncodes this would be super easy. barely an inconvenience