-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.go
60 lines (56 loc) · 3.46 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
55
56
57
58
59
60
package api
import (
"github.com/acoshift/arpc/v2"
)
var (
ErrUnauthorized = newError("api: unauthorized")
ErrForbidden = newError("api: forbidden")
ErrLocationNotAvailable = newError("api: location not available")
ErrLocationNotSupport = newError("api: location not support")
ErrSIDNotAvailable = newError("api: sid not available")
ErrRoleNotFound = newError("api: role not found")
ErrRoleSIDNotAvailable = newError("api: role sid not available")
ErrProjectNotFound = newError("api: project not found")
ErrBillingAccountNotFound = newError("api: billing account not found")
ErrBillingAccountNotActive = newError("api: billing account not active, please contact us via email to activate billing account")
ErrBillingAccountInUsed = newError("api: billing account in used")
ErrDeploymentNotFound = newError("api: deployment not found")
ErrInvalidRouteTarget = newError("api: invalid route target")
ErrCanNotDelete = newError("api: can not delete")
ErrCanNotPause = newError("api: can not pause")
ErrCanNotResume = newError("api: can not resume")
ErrWorkloadIdentityNotFound = newError("api: workload identity not found")
ErrWorkloadIdentityAlreadyExists = newError("api: workload identity already exists")
ErrWorkloadIdentityInUse = newError("api: workload identity in use")
ErrUserNotFound = newError("api: user not found")
ErrDomainNotAvailable = newError("api: domain not available")
ErrReplicasInvalid = newError("api: replicas invalid")
ErrCanMapOnlyWebService = newError("api: can not map to deployment other than web service type")
ErrScheduleInvalid = newError("api: schedule invalid")
ErrTypeInvalid = newError("api: type invalid")
ErrTypeNotAllowChange = newError("api: type not allow to change")
ErrDiskNotFound = newError("api: disk not found")
ErrDiskSizeMustScaleUp = newError("api: disk size must scale up")
ErrDiskAlreadyExists = newError("api: disk already exists")
ErrDiskInUsed = newError("api: disk in use")
ErrPullSecretNameNotAvailable = newError("api: pull secret name not available")
ErrPullSecretNotFound = newError("api: pull secret not found")
ErrPullSecretInUse = newError("api: pull secret in use")
ErrServiceAccountNotFound = newError("api: service account not found")
ErrServiceAccountAlreadyExists = newError("api: service account already exists")
ErrMaximumDeploymentReach = newError("api: maximum deployment reach")
ErrRouteNotFound = newError("api: route not found")
ErrDomainInUsed = newError("api: domain in used")
ErrPurgeFailed = newError("api: purge failed")
ErrDomainNotFound = newError("api: domain not found")
ErrDomainCanNotPurge = newError("api: domain can not purge")
ErrDomainPurgeInvalid = newError("api: domain purge invalid")
ErrDomainDisableCDNNotEnabled = newError("api: domain disable cdn not enabled for this project")
ErrEmailDomainNotFound = newError("api: email domain not found")
)
var AllErrors []error
func newError(msg string) error {
err := arpc.NewError(msg)
AllErrors = append(AllErrors, err)
return err
}