Bug 1659947 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> nsIAbDirSearchListener doesn't currently seem to have any error-handling, which I thought would have been the place for it. In any case, even if there is already error handling, it probably won't be general enough to express security errors (with secInfo access), so there'll be some finessing required.

You're supposed to call onSearchFinished with an error code, but I can see that doesn't really fit with certificate errors. Perhaps add another callback that can handle the data you need to get to the UI. Then you've got the problem that there's [multiple places where this code could be called](https://searchfox.org/comm-central/search?q=onsearchfinished) (actually ext-addressBook.js and AbAutoCompleteSearch.jsm shouldn't be hitting LDAP).
> nsIAbDirSearchListener doesn't currently seem to have any error-handling, which I thought would have been the place for it. In any case, even if there is already error handling, it probably won't be general enough to express security errors (with secInfo access), so there'll be some finessing required.

You're supposed to call onSearchFinished with an error code, but I can see that doesn't really fit with certificate errors. Perhaps add another callback that can handle the data you need to get to the UI. Then you've got the problem that there's [multiple places where this code could be called](https://searchfox.org/comm-central/search?q=symbol%3A%23onSearchFinished&path=) (actually ext-addressBook.js and AbAutoCompleteSearch.jsm shouldn't be hitting LDAP).

Back to Bug 1659947 Comment 9