-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.go
More file actions
34 lines (29 loc) · 1002 Bytes
/
error.go
File metadata and controls
34 lines (29 loc) · 1002 Bytes
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
/*
* Copyright © 2022-2023 Durudex
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
package polybase
type Code string
const (
CodeInvalidArgument Code = "invalid-argument"
CodeFailedPrecondition Code = "failed-precondition"
CodeOutOfRange Code = "out-of-range"
CodeUnauthenticated Code = "unauthenticated"
CodePermissionDenied Code = "permission-denied"
CodeNotFound Code = "not-found"
CodeAborted Code = "aborted"
CodeAlreadyExists Code = "already-exists"
CodeResourceExhausted Code = "resource-exhausted"
CodeCancelled Code = "cancelled"
CodeUnavailable Code = "unavailable"
CodeInternal Code = "internal"
CodeDeadlineExceeded Code = "deadline-exceeded"
)
type Error struct {
Reason string `json:"reason"`
Code Code `json:"code"`
Message string `json:"message"`
}
func (e *Error) Error() string { return e.Message }