Skip to content

Commit

Permalink
fix: 修复 error 判断逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
OverNaive committed May 20, 2021
1 parent dd04b5b commit 048f483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/html2x.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 048f483

Please sign in to comment.