-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
88 lines (64 loc) · 3.05 KB
/
errors.go
File metadata and controls
88 lines (64 loc) · 3.05 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package goriffle
type RealmExistsError string
func (e RealmExistsError) Error() string {
return "realm exists: " + string(e)
}
type NoSuchRealmError string
func (e NoSuchRealmError) Error() string {
return "no such realm: " + string(e)
}
type AuthenticationError string
func (e AuthenticationError) Error() string {
return "authentication error: " + string(e)
}
type InvalidURIError string
func (e InvalidURIError) Error() string {
return "invalid URI: " + string(e)
}
const (
// --- Interactions ---
// Connection provided an incorrect URI for any URI-based attribute of WAMP message,
// such as realm, topic or procedure.
ErrInvalidUri = "wamp.error.invalid_uri"
// A Dealer could not perform a call, since no procedure is currently
// registered under the given URI.
ErrNoSuchDomain = "wamp.error.no_such_procedure"
// A procedure could not be registered, since a procedure with the given URI
// is already registered.
ErrDomainAlreadyExists = "wamp.error.procedure_already_exists"
// A Dealer could not perform an unregister, since the given registration is
// not active.
ErrNoSuchRegistration = "wamp.error.no_such_registration"
// A Broker could not perform an unsubscribe, since the given subscription is
// not active.
ErrNoSuchSubscription = "wamp.error.no_such_subscription"
// A call failed, since the given argument types or values are not acceptable
// to the called procedure - in which case the Callee may throw this error. Or
// a Node performing payload validation checked the payload (args / kwargs)
// of a call, call result, call error or publish, and the payload did not
// conform - in which case the Node may throw this error.
ErrInvalidArgument = "wamp.error.invalid_argument"
// --- Session Close ---
// The Connection is shutting down completely - used as a GOODBYE (or aBORT) reason.
ErrSystemShutdown = "wamp.error.system_shutdown"
// The Connection wants to leave the realm - used as a GOODBYE reason.
ErrCloseRealm = "wamp.error.close_realm"
// A Connection acknowledges ending of a session - used as a GOOBYE reply reason.
ErrGoodbyeAndOut = "wamp.error.goodbye_and_out"
// --- Authorization ---
// A join, call, register, publish or subscribe failed, since the Connection is not
// authorized to perform the operation.
ErrNotAuthorized = "wamp.error.not_authorized"
// A Dealer or Broker could not determine if the Connection is authorized to perform
// a join, call, register, publish or subscribe, since the authorization
// operation itself failed. E.g. a custom authorizer ran into an error.
ErrAuthorizationFailed = "wamp.error.authorization_failed"
// Connection wanted to join a non-existing realm (and the Node did not allow to
// auto-create the realm)
ErrNoSuchRealm = "wamp.error.no_such_realm"
// A Connection was to be authenticated under a Role that does not (or no longer)
// exists on the Node. For example, the Connection was successfully authenticated,
// but the Role configured does not exists - hence there is some
// misconfiguration in the Node.
ErrNoSuchRole = "wamp.error.no_such_role"
)