/
entityErrors.go
37 lines (35 loc) · 1.3 KB
/
entityErrors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package entityErrors
import "fmt"
var (
/*
IncompatibleEntityType is an error that signifies that the
Entity provided for a certain operation cannot be used for
that operation due to a type mismatch.
*/
IncompatibleEntityType = fmt.Errorf("incompatible entity type")
/*
UndefinedAxis is an error which signifies that an Entity's
axis fields are undefined. This could be raised, for example,
when attempting to Filter for an Entity whose ID eField is
primitive.NilObjectID and all axis fields are zeroed- in such
a case, no Filter may be created.
*/
UndefinedAxis = fmt.Errorf("entity axis undefined (Axis Policy)")
/*
DBDecodeFail is an error which represents a failed attempt to
read a value returned from the database.
*/
DBDecodeFail = fmt.Errorf("failed to decode DB value")
/*
AddedIDParseFail is an error which signifies that an operation
to add an Entity has succeeded, but the attempt to read the
new database ID of that Entity has failed.
*/
AddedIDParseFail = fmt.Errorf("added entity but failed to parse addedID")
/*
BodyIncomplete is an error which signifies that the required
fields for an Entity have not been provided. It is returned
when attempting to add an incomplete Entity to the database.
*/
BodyIncomplete = fmt.Errorf("entity body incomplete- will not add")
)