In case of streaming, couchDB sends a 201code as a success. Though in the following code snippet
send_attachment(Ref, eof) ->
case hackney:finish_send_body(Ref) of
ok ->
Resp = hackney:start_response(Ref),
reply_att(Resp); %% <<----- Mind here
Error ->
Error
end;
In case of streaming, couchDB sends a 201code as a success. Though in the following code snippet
reply_att/1 Handles only 200 as a success code. So in my case I had the following response when I called
couchbeam:send_attachment(Ref, eof)
Maybe a
{ok, {R}}
would be a better fit?Cheers.