package attachmentdom

import "errors"

// Sentinel errors returned by attachment domain operations.
var (
	ErrFileNotFound       = errors.New("file not found")
	ErrAttachmentNotFound = errors.New("attachment not found")
	ErrUploadNotPending   = errors.New("file upload is not in pending state")
	ErrFileSizeZero       = errors.New("file size must be greater than zero")
	ErrFileNameEmpty      = errors.New("file name must not be empty")
	ErrContentTypeEmpty   = errors.New("content type must not be empty")

	// ErrMultipartUploadIDRequired is returned when a file was initiated as a
	// multipart upload but the caller did not supply an upload_id on complete.
	ErrMultipartUploadIDRequired = errors.New("multipart upload requires an upload_id")
	// ErrNotMultipartUpload is returned when the caller supplies an upload_id
	// but the file was not initiated as a multipart upload.
	ErrNotMultipartUpload = errors.New("file was not initiated as a multipart upload")
	// ErrUploadIDMismatch is returned when the provided upload_id does not
	// match the upload session stored on the file record.
	ErrUploadIDMismatch = errors.New("upload_id does not match the recorded multipart upload session")
	// ErrDocFileMismatch is returned when a file does not belong to the
	// specified document (storage key prefix mismatch).
	ErrDocFileMismatch = errors.New("file does not belong to the specified document")
	// ErrMultipartPartsEmpty is returned when a multipart complete request
	// contains no parts.
	ErrMultipartPartsEmpty = errors.New("multipart upload requires at least one part")
	// ErrTaskNotInProject is returned when the referenced task does not belong
	// to the project specified in the request URL.
	ErrTaskNotInProject = errors.New("task does not belong to the specified project")
)
