nickva commented on PR #5686:
URL: https://github.com/apache/couchdb/pull/5686#issuecomment-3366783910

   I wonder if instead of exiting on missing_target we transform it into a 
`database_does_not_exist` error in 
https://github.com/apache/couchdb/blob/4244bf2be1c44140d94f40ab9789f127e321dbe9/src/fabric/src/fabric_rpc.erl#L502
   
   Looking around here is what found:
   
   At some point in the past (https://github.com/apache/couchdb/pull/2690) we 
started using the `mem3_util `helper to create the db, which was a nice feature 
try DRY-up the logic 
   
   <img width="504" height="167" alt="Screenshot 2025-10-03 at 2 24 00 PM" 
src="https://github.com/user-attachments/assets/9f59dab3-fe7f-4bd1-8b9a-10fa19cd4353";
 />
   
   However, when doing that we forgot to consider that `mem3_util` will throw 
and return things specific to mem3 replicator and other bits from that 
application which may not be handled properly in fabric or other parts. For 
instance, in this case it throws a `missing_target` which makes no sense for 
ken, it doesn't deal with "targets" at  all. So one way to fix it maybe to at 
least catch the `missing_target` throw in fabric_rpc and re-raise it as an 
`database_does_not_exist` error. Otherwise we may have to sprinkle 
`missing_target` catch and exception everywhere.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to