You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2018/03/07 14:56:43 UTC
[couchdb] branch master updated: Add error tuple return type to
replicator auth spec and callback
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new cd598d8 Add error tuple return type to replicator auth spec and callback
cd598d8 is described below
commit cd598d892faeb14cf2b23542e73ebc1c262b2f95
Author: Jay Doane <ja...@gmail.com>
AuthorDate: Tue Mar 6 18:53:39 2018 -0800
Add error tuple return type to replicator auth spec and callback
The {error, term()} return type is added to both the initialize/1
callback and spec, which matches the underlying implementation.
---
src/couch_replicator/src/couch_replicator_auth.erl | 3 ++-
src/couch_replicator/src/couch_replicator_auth_session.erl | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/couch_replicator/src/couch_replicator_auth.erl b/src/couch_replicator/src/couch_replicator_auth.erl
index 1c9a497..60273fc 100644
--- a/src/couch_replicator/src/couch_replicator_auth.erl
+++ b/src/couch_replicator/src/couch_replicator_auth.erl
@@ -33,7 +33,8 @@
% Behavior API
--callback initialize(#httpdb{}) -> {ok, #httpdb{}, term()} | ignore.
+-callback initialize(#httpdb{}) ->
+ {ok, #httpdb{}, term()} | {error, term()} | ignore.
-callback update_headers(term(), headers()) -> {headers(), term()}.
diff --git a/src/couch_replicator/src/couch_replicator_auth_session.erl b/src/couch_replicator/src/couch_replicator_auth_session.erl
index 3fff295..fedc4c6 100644
--- a/src/couch_replicator/src/couch_replicator_auth_session.erl
+++ b/src/couch_replicator/src/couch_replicator_auth_session.erl
@@ -100,7 +100,8 @@
% Behavior API callbacks
--spec initialize(#httpdb{}) -> {ok, #httpdb{}, term()} | ignore.
+-spec initialize(#httpdb{}) ->
+ {ok, #httpdb{}, term()} | {error, term()} | ignore.
initialize(#httpdb{} = HttpDb) ->
case init_state(HttpDb) of
{ok, HttpDb1, State} ->
--
To stop receiving notification emails like this one, please contact
vatamane@apache.org.