mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-06 15:46:00 +01:00
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>
15 lines
307 B
Go
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
|
|
)
|