1
0
mirror of https://github.com/owenthereal/jqplay.git synced 2025-04-19 06:02:17 +03:00

Capture malfunction run

This commit is contained in:
Owen Ou 2024-01-15 09:44:29 -08:00
parent ec8fd24029
commit 2c8705a88a
No known key found for this signature in database
GPG Key ID: 6CDA9490BEB1E446

View File

@ -52,7 +52,7 @@ func (h *JQHandler) handleJqPost(c *gin.Context) {
out := bytes.NewBuffer(nil)
if err := h.JQExec.Eval(c.Request.Context(), j, io.MultiWriter(c.Writer, out)); err != nil {
if err == jq.ErrExecAborted || err == jq.ErrExecTimeout {
h.logger(c).Error("jq error", "error", err, "out", out.String())
h.logger(c).Error("jq error", "error", err, "out", out.String(), "in", j)
}
fmt.Fprint(c.Writer, err.Error())