<div dir="ltr">Hello,<br><br>We are investigating the behavior of midPoint when a resource object requested by UID no longer exists on the target system.<br><br>Environment:<br>- midPoint version/build: <version><br>- Connector bundle and version: <connector/version><br>- ConnId framework version: <version><br>- Exact GUI page/action: <page or action><br>- Resource object class: <object class><br><br>Our connector implements SearchOp with the following behavior:<br><br>1. An equality filter on __UID__ is translated into a native UidFilter.<br>2. executeQuery() performs a targeted request to the external system.<br>3. If the external system returns the object, the connector invokes<br>   ResultsHandler.handle(...).<br>4. If the object does not exist, the connector does not invoke the handler<br>   and executeQuery() returns normally.<br>5. UnknownUidException is not thrown for this search result.<br><br>This is our simplified implementation:<br><br>    if (filter != null && filter.isByUid()) {<br>        String uid = filter.getUid().getUidValue();<br>        AccountDto account = accountService.getAccountByLogin(uid);<br><br>        if (account != null) {<br>            handler.handle(AccountMapper.toConnectorObject(account));<br>        }<br><br>        return;<br>    }<br><br>Our understanding of the ConnId connector development guide is that returning<br>zero results, i.e. not invoking ResultsHandler.handle(...), is the expected<br>behavior when the requested resource object does not exist.<br><br>However, when we open the object in the midPoint GUI, midPoint displays a<br>full-page error:<br><br>    404<br>    Couldn't get object.<br>    Not Found<br><br>In some reproductions, our logs also indicate that the target-system API call<br>is not reached at all.<br><br>Could you please clarify the following?<br><br>1. Is a full-page HTTP 404 the expected GUI behavior when a targeted ConnId<br>   UID lookup returns zero results?<br><br>2. Does this 404 necessarily mean that executeQuery() returned no object, or<br>   can it also mean that the repository shadow or another midPoint object was<br>   not found before the connector was invoked?<br><br>3. If a repository shadow exists but the corresponding resource object has<br>   been removed externally, should midPoint run discovery and either mark/delete<br>   the shadow or recreate the resource object?<br><br>4. Under which conditions can a GUI get operation be served from the repository<br>   or shadow cache without invoking the connector?<br><br>5. Is our interpretation correct that returning null from<br>   AbstractFilterTranslator.createEqualsExpression(...) means “fetch all and<br>   apply framework-side filtering”, and should not prevent executeQuery() from<br>   being called?<br><br>We can provide:<br>- the screenshot of the 404 page;<br>- sanitized ConnId API and SPI TRACE logs;<br>- connector logs around createFilterTranslator(), executeQuery(), the target<br>  API invocation, and ResultsHandler.handle();<br>- sanitized shadow XML before and after the operation;<br>- the relevant resource consistency and caching configuration.<br><br>Thank you.</div>