Merge pull request #58 from navi-ppl/TP-5555/hotfix-wrong-payload
TP-5555 | return if not enough lines
This commit is contained in:
@@ -122,6 +122,7 @@ func (exceptionService *ExceptionService) CatchErrors(c *gin.Context) {
|
|||||||
if len(lines) <= 2 {
|
if len(lines) <= 2 {
|
||||||
exceptionService.logger.Error("payload is not valid", zap.Strings("payload", lines))
|
exceptionService.logger.Error("payload is not valid", zap.Strings("payload", lines))
|
||||||
c.JSON(http.StatusOK, gin.H{"status": "payload is not valid"})
|
c.JSON(http.StatusOK, gin.H{"status": "payload is not valid"})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
err := json.Unmarshal([]byte(lines[2]), &jsonData)
|
err := json.Unmarshal([]byte(lines[2]), &jsonData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user