From aeb4472e4a5263031ac96786d9745472f059d6e5 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Fri, 20 Sep 2024 05:30:46 -0700 Subject: [PATCH] checkpoint Signed-off-by: Jeff Ortel --- api/analysis.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/analysis.go b/api/analysis.go index bec17584..e48f9143 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -406,6 +406,12 @@ func (h AnalysisHandler) AppCreate(ctx *gin.Context) { defer func() { _ = f.Close() }() + d, err = h.Decoder(ctx, file.Encoding, reader) + if err != nil { + err = &BadRequestError{err.Error()} + _ = ctx.Error(err) + return + } for { r := &Issue{} err = d.Decode(r) @@ -439,6 +445,12 @@ func (h AnalysisHandler) AppCreate(ctx *gin.Context) { defer func() { _ = f.Close() }() + d, err = h.Decoder(ctx, file.Encoding, reader) + if err != nil { + err = &BadRequestError{err.Error()} + _ = ctx.Error(err) + return + } var deps []*TechDependency for { r := &TechDependency{}