You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/07 14:56:41 UTC

[GitHub] nickva closed pull request #1206: Add error tuple return type to replicator auth spec and callback

nickva closed pull request #1206: Add error tuple return type to replicator auth spec and callback
URL: https://github.com/apache/couchdb/pull/1206
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/couch_replicator/src/couch_replicator_auth.erl b/src/couch_replicator/src/couch_replicator_auth.erl
index 1c9a497232..60273fc32f 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 3fff295725..fedc4c6687 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} ->


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services