github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/model/move/errors.go (about)

     1  package move
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/labstack/echo/v4"
     7  )
     8  
     9  var (
    10  	// ErrExportNotFound is used when a export document could not be found
    11  	ErrExportNotFound = echo.NewHTTPError(http.StatusNotFound, "exports: not found")
    12  	// ErrExportExpired is used when the export document has expired along with
    13  	// its associated data.
    14  	ErrExportExpired = echo.NewHTTPError(http.StatusNotFound, "exports: has expired")
    15  	// ErrMACInvalid is used when the given MAC is not valid.
    16  	ErrMACInvalid = echo.NewHTTPError(http.StatusUnauthorized, "exports: invalid mac")
    17  	// ErrExportConflict is used when an export is already being perfomed.
    18  	ErrExportConflict = echo.NewHTTPError(http.StatusConflict, "export: an archive is already being created")
    19  	// ErrExportDoesNotContainIndex is used when we could not find the index data
    20  	// in the archive.
    21  	ErrExportDoesNotContainIndex = echo.NewHTTPError(http.StatusBadRequest, "export: archive does not contain index data")
    22  	// ErrExportInvalidCursor is used when the given index cursor is invalid
    23  	ErrExportInvalidCursor = echo.NewHTTPError(http.StatusBadRequest, "export: cursor is invalid")
    24  	// ErrNotEnoughSpace is used when the quota is too small to import the files
    25  	ErrNotEnoughSpace = echo.NewHTTPError(http.StatusRequestEntityTooLarge, "import: not enough disk space")
    26  )