1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-06 15:46:00 +01:00
Files
glusterd2/pkg/api/errors.go
Aravinda VK 16482780f0 Added error code argument to SendHTTPError
Added extra argument to SendHTTPError function and added default error
code in all places.

To add a new error code, add entry in `pkg/api/errors.go` and then use
while calling SendHTTPError

Updates: #419
Signed-off-by: Aravinda VK <mail@aravindavk.in>
2017-11-16 12:38:49 +05:30

15 lines
307 B
Go

package api
// HTTPError represents HTTP error returned by glusterd2
type HTTPError struct {
Error string `json:"Error"`
}
// ErrorCode represents API Error code Type
type ErrorCode uint16
const (
// ErrCodeDefault represents default error code for API responses
ErrCodeDefault ErrorCode = iota + 1
)