func NewAPIError(code int, msg ...interface{}) APIError {
	return &apiErrorImpl{code: code, msg: fmt.Sprint(msg...)}
}
NewAPIError -- Create an APIError instance
package util
import (
	"fmt"
	"net/http"
	"github.com/sirupsen/logrus"
)
const (
	OtherError = 0
	BadRequestError = http.StatusBadRequest
	AuthenticationError = http.StatusUnauthorized
	ForbiddenError = http.StatusForbidden
	NotFoundError = http.StatusNotFound
	TooManyRequestsError = http.StatusTooManyRequests
)
type APIError interface {
	error
	Code() int
}
type apiErrorImpl struct {
	msg  string
	code int
}
func (e *apiErrorImpl) Error() string {
	return e.msg
}
func (e *apiErrorImpl) Code() int {
	return e.code
}