DocumentRepository error handling

Moin @arthur-typed-river,

please have a look at the following discourse thread: Relationship Upper Limit Reached error message / validation - #4 by jlemsky

I think the discussion and provided solution in there, might already help you.