From 48d3f439d82385d85fd2c7ba9d506a2ccb6bab1c Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Thu, 23 Oct 2025 10:54:54 +0300 Subject: handler-case doesn't allow restarts --- src/transport.lisp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/transport.lisp b/src/transport.lisp index 52d0dcf..bcdf3bc 100644 --- a/src/transport.lisp +++ b/src/transport.lisp @@ -26,15 +26,10 @@ ;; This is needed to avoid hangs, ;; see https://github.com/fukamachi/dexador/issues/91#issuecomment-1093472364 (cl+ssl:*default-unwrap-stream-p* nil)) - (handler-case (dex:request uri :method method :content content :read-timeout 60 :connect-timeout 60) - ;; We deal with too many requests manually - (dex:http-request-too-many-requests (e) (dex:ignore-and-continue e)) - (dex:http-request-failed (e) - (log:warn "HTTP request failed: ~A" e) - (funcall retrier e)) - (cl+ssl::ssl-error (e) - (log:warn "SSL error: ~A" e) - (funcall retrier e))))) + (handler-bind ((dex:http-request-too-many-requests #'dex:ignore-and-continue) + (dex:http-request-failed retrier) + (cl+ssl::ssl-error retrier)) + (dex:request uri :method method :content content :read-timeout 60 :connect-timeout 60)))) ;; TODO: (alist string t) (-> do-call% (http-method string t list) t) -- cgit v1.2.3