diff --git a/utils/error.go b/utils/error.go index 6e4c334..4da0629 100644 --- a/utils/error.go +++ b/utils/error.go @@ -9,7 +9,7 @@ import ( ) func RenderError(c *fiber.Ctx, code int) error { - if !strings.Contains(c.Get("Accept"), "html") { + if !strings.Contains(c.Get("Accept"), "html") && c.Params("extension") != "" { codeStr := "generic" if code != 0 { codeStr = strconv.Itoa(code)