Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions connectors/connid/1.x/connector-development-guide/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1304,14 +1304,9 @@ Errors that are not harmful to the system and origin from data inconsistency (e.

The normal behavior of the `executeQuery(...)` operation is to return all the objects that satisfy the query.
If there is no such object than the `executeQuery(...)` should not return any object (i.e. do not invoke the handler).
But *the executeQuery(...) operation should not indicate any error* in this case.
It should not throw any exception.
MidPoint will see empty result set and it will figure out that there is no such object.

However, there are (quite rare) cases when the search should throw UnknownUidException.
One such case is when the container (base context) option is present in the operation arguments and the container object is not found.
Then the search query cannot be executed and in fact we do not know whether the search objects exist or not.
This condition is indicated by throwing UnknownUidException and this case should be interpreted differently than not returning any results at all.
In other words, *the executeQuery(...) operation should not throw any exception in case object was not found on the resource.* MidPoint will see empty result set and it will figure out that there is no such object.

However, there are situations in which the `executeQuery(...)` should throw exceptions. It may throw exceptions such as ConnectionBrokenException or ConnectionFailedException if the resource returns an error during the query operation. A rarer case is UnknownUidException: this can occur when the container (base context) option is present in the operation arguments but the container object cannot be found. In such a situation, the search query cannot be executed, and we cannot determine whether the target objects exist. This condition is indicated by throwing UnknownUidException, and it should be interpreted differently from simply returning no results.

=== Search and Filter Translation

Expand Down