On Tue, Feb 21, 2012 at 7:30 PM, Bob Dionne <[email protected]> wrote: > Hi Filipe, > > I'm seeing an issue in the replicator. This anonymous function [1] is > throwing function_clause errors as it doesn't handle codes 400-500 that might > occur in [2,3].
Right, like in some other places we don't deal with all possible http status codes, only a subset that are expected (success or otherwise). Which http status code are you receiving? How to reproduce that? I have a rough idea how to fix it but I'm not sure whether I should handle it in replicator_httpc or up in the callback. Does this ring a bell? Opinions? > > Cheers, > > Bob > > [1] > https://github.com/bdionne/couchdb/blob/master/src/couch_replicator/src/couch_replicator_api_wrap.erl#L335 > [2] > https://github.com/bdionne/couchdb/blob/master/src/couch_replicator/src/couch_replicator_httpc.erl#L90 > [3] > https://github.com/bdionne/couchdb/blob/master/src/couch_replicator/src/couch_replicator_httpc.erl#L111 -- Filipe David Manana, "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
