Skip to content

Commit e837644

Browse files
committed
use ctx error over document error
1 parent 459ff20 commit e837644

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lightblue-ldap-crud/src/main/java/com/redhat/lightblue/crud/ldap/LdapCRUDController.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,7 @@ public CRUDFindResponse find(CRUDOperationContext ctx,
233233
translatedDocs.add(resultTranslator.translate(entry));
234234
}
235235
catch(Exception e){
236-
DocCtx erroredDoc = new DocCtx(new JsonDoc(null));
237-
erroredDoc.addError(Error.get(e));
238-
translatedDocs.add(erroredDoc);
236+
ctx.addError(Error.get(e));
239237
}
240238
}
241239
ctx.setDocuments(translatedDocs);

0 commit comments

Comments
 (0)