andersfugmann / aws-s3

Ocaml library to access Amazon S3
https://andersfugmann.github.io/aws-s3/
BSD 3-Clause "New" or "Revised" License
49 stars 13 forks source link

Failed connection attempts are not handled #21

Closed andersfugmann closed 4 years ago

andersfugmann commented 4 years ago

Failed connection attempts seems not to be caught an placed in the or_error result.

(((pid 30112) (thread_id 0)) "2019-11-12 10:07:41.525360589Z"
 "unhandled exception in Async scheduler"
 ("unhandled exception"
  ((monitor.ml.Error
    ("connection attempt timeout" 52.217.40.14:443 src/tcp.ml:120:11)
    ("Raised at file \"src/error.ml\" (inlined), line 9, characters 14-30"
     "Called from file \"src/error.ml\" (inlined), line 5, characters 2-50"
     "Called from file \"src/tcp.ml\", line 120, characters 11-76"
     "Called from file \"src/job_queue.ml\", line 170, characters 6-47"))
   ((pid 30112) (thread_id 38)))))

Either extend the error type with a Connection_failed or place the error under Failed of exn