You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "nickva (via GitHub)" <gi...@apache.org> on 2025/10/07 15:14:46 UTC
Re: [PR] Fix `case_clause` when got `missing_target` error [couchdb]
nickva commented on code in PR #5686:
URL: https://github.com/apache/couchdb/pull/5686#discussion_r2410997103
##########
src/fabric/src/fabric_rpc.erl:
##########
@@ -499,7 +511,12 @@ get_node_seqs(Db, Nodes) ->
[{binary_to_existing_atom(N), S} || {N, S} <- NodeBinSeqs].
get_or_create_db(DbName, Options) ->
- mem3_util:get_or_create_db_int(DbName, Options).
+ try
+ mem3_util:get_or_create_db_int(DbName, Options)
+ catch
+ throw:{error, missing_target} ->
+ throw({error, database_does_not_exist})
Review Comment:
In the rest of the code `database_does_not_exist` is usually an erlang error, as in it's raised with `error(database_does_not_exist)`, would that break or alter a lot of the handling code if we go with that?
Now if doing it that way cascades to a lot of handlers and having to alter a lot of code we may have to reconsider
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org