-
Notifications
You must be signed in to change notification settings - Fork 8
/
errors.go
54 lines (46 loc) · 1.84 KB
/
errors.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package oaipmh
var (
ErrBadVerb = Error{
Code: "badVerb",
Message: "Value of the verb argument is not a legal OAI-PMH verb, " +
"the verb argument is missing, or the verb argument is repeated.",
}
ErrBadArgument = Error{
Code: "badArgument",
Message: "The request includes illegal arguments, is missing required arguments, " +
"includes a repeated argument, or values for arguments have an illegal syntax.",
}
ErrBadResumptionToken = Error{
Code: "badResumptionToken",
Message: "The value of the resumptionToken argument is invalid or expired.",
applicableVerbs: []Verb{VerbListIdentifiers, VerbListRecords, VerbListSets},
}
ErrCannotDisseminateFormat = Error{
Code: "cannotDisseminateFormat",
Message: "The metadata format identified by the value given for the " +
"metadataPrefix argument is not supported by the item or by the repository.",
applicableVerbs: []Verb{VerbGetRecord, VerbListIdentifiers, VerbListRecords},
}
ErrIdDoesNotExist = Error{
Code: "idDoesNotExist",
Message: "The value of the identifier argument is unknown or illegal " +
"in this repository.",
applicableVerbs: []Verb{VerbGetRecord, VerbListMetadataFormats},
}
ErrNoRecordsMatch = Error{
Code: "noRecordsMatch",
Message: "The combination of the values of the from, until, set " +
"and metadataPrefix arguments results in an empty list.",
applicableVerbs: []Verb{VerbListIdentifiers, VerbListRecords},
}
ErrNoMetadataFormats = Error{
Code: "noMetadataFormats",
Message: "There are no metadata formats available for the specified item.",
applicableVerbs: []Verb{VerbListMetadataFormats},
}
ErrNoSetHierachy = Error{
Code: "noSetHierarchy",
Message: "The repository does not support sets.",
applicableVerbs: []Verb{VerbListSets, VerbListRecords, VerbListIdentifiers},
}
)