From 048f4838a7c7ffa69bee80791721a18d2d3d9e7c Mon Sep 17 00:00:00 2001 From: OverNaive Date: Fri, 21 May 2021 01:34:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20error=20=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/html2x.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html2x.go b/src/html2x.go index d0bceff..f886c5f 100644 --- a/src/html2x.go +++ b/src/html2x.go @@ -14,7 +14,7 @@ func htmlToPdf(w http.ResponseWriter, r *http.Request) { if err != nil { var mr *malformedRequest - if errors.Is(err, mr) { + if errors.As(err, &mr) { http.Error(w, mr.msg, mr.status) } else { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)