github.com/cozy/cozy-stack@v0.0.0-20240327093429-939e4a21320e/model/note/errors.go (about)

     1  package note
     2  
     3  import "errors"
     4  
     5  var (
     6  	// ErrInvalidSchema is used when the schema cannot be read by prosemirror.
     7  	ErrInvalidSchema = errors.New("Invalid schema for prosemirror")
     8  	// ErrInvalidFile is used when a file doesn't have the metadata to be used
     9  	// as a note.
    10  	ErrInvalidFile = errors.New("Invalid file, not a note")
    11  	// ErrNoSteps is used when steps are expected, but there are none.
    12  	ErrNoSteps = errors.New("No steps")
    13  	// ErrInvalidSteps is used when prosemirror can't instantiate the steps.
    14  	ErrInvalidSteps = errors.New("Invalid steps")
    15  	// ErrCannotApply is used when trying to apply some steps, but it fails
    16  	// because of a conflict. The client can try to rebase the steps.
    17  	ErrCannotApply = errors.New("Cannot apply the steps")
    18  	// ErrTooOld is used when the steps just after the given revision are no
    19  	// longer available.
    20  	ErrTooOld = errors.New("The revision is too old")
    21  	// ErrMissingSessionID is used when a telepointer has no identifier.
    22  	ErrMissingSessionID = errors.New("The session id is missing")
    23  )