Skip to content

Commit

Permalink
changed internal server error to bad request
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirari04 committed Jan 23, 2024
1 parent a96052a commit 9623d9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions logic/CreateFile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9623d9f

Please sign in to comment.