( c *gin.Context, machine *relay.PluginResponsesMachine, lastStatus string, )
| 1126 | } |
| 1127 | |
| 1128 | func writeTaskPluginProtocolTimeoutResponse( |
| 1129 | c *gin.Context, |
| 1130 | machine *relay.PluginResponsesMachine, |
| 1131 | lastStatus string, |
| 1132 | ) { |
| 1133 | response, err := machine.TimeoutResponse(lastStatus) |
| 1134 | if err != nil { |
| 1135 | logger.LogError(c, "task protocol timeout response failed: "+err.Error()) |
| 1136 | respondPluginProtocolError(c, http.StatusInternalServerError, "task_protocol_error", "Task protocol request failed") |
| 1137 | return |
| 1138 | } |
| 1139 | c.JSON(http.StatusOK, response) |
| 1140 | } |
| 1141 | |
| 1142 | func taskPluginProtocolJSONValue(value any) (any, error) { |
| 1143 | encoded, err := common.Marshal(value) |
no test coverage detected