From 07ad5f350b4a53dac9260c1e0528fae1dd8647bb Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 8 Feb 2026 15:02:52 +0200 Subject: Try to deal with Bad Gateway better --- src/transport.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/transport.lisp b/src/transport.lisp index bcdf3bc..8523816 100644 --- a/src/transport.lisp +++ b/src/transport.lisp @@ -1,5 +1,5 @@ ;; SPDX-License-Identifier: EUPL-1.2 -;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs +;; SPDX-FileCopyrightText: 2025-2026 Uko Kokņevičs (defpackage :ukkoclot/src/transport (:documentation "Package dealing with HTTP calls.") (:use :c2cl) @@ -26,9 +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-bind ((dex:http-request-too-many-requests #'dex:ignore-and-continue) + (handler-bind ((cl+ssl::ssl-error retrier) + (dex:http-request-bad-gateway retrier) (dex:http-request-failed retrier) - (cl+ssl::ssl-error retrier)) + (dex:http-request-too-many-requests #'dex:ignore-and-continue)) (dex:request uri :method method :content content :read-timeout 60 :connect-timeout 60)))) ;; TODO: (alist string t) -- cgit v1.2.3