Skip to content

finally remove "local" source/target support in _replicate - #6190

Draft
rnewson wants to merge 1 commit into
mainfrom
remove-local-source-target
Draft

rnewson wants to merge 1 commit into
mainfrom
remove-local-source-target

Conversation

@rnewson

@rnewson rnewson commented Oct 29, 2026

Copy link
Copy Markdown
Member

Overview

Testing recommendations

Related Issues or Pull Requests

Checklist

  • This is my own work, I did not use AI, LLM's or similar technology
  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • Documentation changes were made in the src/docs folder
  • Documentation changes were backported (separated PR) to affected branches

Comment thread src/chttpd/src/chttpd.erl
fun chttpd_db:handle_request/1
),
AuthorizedReq = chttpd_auth:authorize(
possibly_hack(HttpReq),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're removing the hack we should bubble up the "invalid replication" exceptions better to the users as 4xx errors and not 500s:

So maybe we add a few clauses to error_info:

error_info({error, local_endpoints_not_supported}) ->
    {400, ~"invalid_replication", ~"local database names are not supported, use a full URL"};
error_info({error, ~"Missing replicator database" = Reason}) ->
    {400, ~"invalid_replication", Reason};

To avoid the odd binary as reason we could change that as well (it's in couch_replicator_parse):

throw({error, <<"Missing replicator database">>}) -> throw({error, missing_replicator_database}) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants