From 9623d9f554d99d4f30bc5f13afc45d22accc3cc5 Mon Sep 17 00:00:00 2001 From: kirari04 Date: Tue, 23 Jan 2024 09:27:39 +0100 Subject: [PATCH] changed internal server error to bad request --- logic/CreateFile.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/logic/CreateFile.go b/logic/CreateFile.go index 4c005df..3e67479 100755 --- a/logic/CreateFile.go +++ b/logic/CreateFile.go @@ -68,8 +68,9 @@ func CreateFile(fromFile *string, toFolder uint, fileName string, fileId string, // probe file data, err := ffprobe.ProbeURL(ctx, *fromFile) if err != nil { - log.Printf("Error getting data using ffprobe: %v", err) - return http.StatusInternalServerError, nil, false, echo.ErrInternalServerError + // log.Printf("Error getting data using ffprobe: %v", err) + // return http.StatusInternalServerError, nil, false, echo.ErrInternalServerError + return http.StatusBadRequest, nil, false, errors.New("Invalid data found when processing video") } // proobe type dataStreams := data.StreamType(ffprobe.StreamAny)