diff --git a/router/error.go b/router/error.go index 091edda..654407a 100644 --- a/router/error.go +++ b/router/error.go @@ -106,7 +106,7 @@ func (e *RequestError) AbortFilesystemError(c *gin.Context) { } if errors.Is(e.Err, server.ErrNotEnoughDiskSpace) { - c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{ + c.AbortWithStatusJSON(http.StatusConflict, gin.H{ "error": server.ErrNotEnoughDiskSpace.Error(), }) return diff --git a/router/router_server_files.go b/router/router_server_files.go index 878d835..8633fbd 100644 --- a/router/router_server_files.go +++ b/router/router_server_files.go @@ -309,7 +309,7 @@ func postServerCompressFiles(c *gin.Context) { f, err := s.Filesystem.CompressFiles(data.RootPath, data.Files) if err != nil { - TrackedServerError(err, s).AbortWithServerError(c) + TrackedServerError(err, s).AbortFilesystemError(c) return } @@ -374,7 +374,7 @@ func postServerDecompressFiles(c *gin.Context) { return } - TrackedServerError(err, s).AbortWithServerError(c) + TrackedServerError(err, s).AbortFilesystemError(c) return }