klarna / bec

The BitBucket Erlang Client
Apache License 2.0
47 stars 12 forks source link

add retry mechanism on socket_closed_remotely #30

Open klarnalzw opened 3 years ago

klarnalzw commented 3 years ago

sometime we got this error because of network issue (I guess), it would be nice if we could have any retry mechanism.

escript: exception error: no match of right hand side value {error,
                                                    socket_closed_remotely}
  in function  bitbucket_repo_config:do_verify/4 (/bitbucket_erlang_client/_build/default/lib/bitbucket_erlang_client/src/bitbucket_repo_config.erl, line 139)
  in call from bitbucket_repo_config:do_verify/6 (/bitbucket_erlang_client/_build/default/lib/bitbucket_erlang_client/src/bitbucket_repo_config.erl, line 82)
  in call from bitbucket_erlang_client:do_main/1 (/bitbucket_erlang_client/_build/default/lib/bitbucket_erlang_client/src/bitbucket_erlang_client.erl, line 40)
  in call from escript:run/2 (escript.erl, line 759)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3