AdminLimitExceeded is not really an error for the Search operation

This commit is contained in:
Matvey Aksenov 2015-03-28 10:32:34 +00:00
parent c9d034f952
commit 2013999e24

View File

@ -285,6 +285,7 @@ searchAsyncSTM l base opts flt attributes =
searchResult :: Response -> Either SearchError [SearchEntry]
searchResult (Type.SearchResultDone (Type.LdapResult code _ _ _) :| xs)
| Type.Success <- code = Right (mapMaybe g xs)
| Type.AdminLimitExceeded <- code = Right (mapMaybe g xs)
| otherwise = Left (SearchErrorCode code)
where
g (Type.SearchResultEntry (Type.LdapDn (Type.LdapString dn))