fossteams-api/pkg/authz_error.go
2021-06-08 21:34:28 +02:00

20 lines
378 B
Go

package api
import "fmt"
const (
GuestUserNotRedeemed AuthzErrorCode = "GuestUserNotRedeemed"
)
type AuthzErrorCode string
var _ error = AuthzError{}
type AuthzError struct {
ErrorCode AuthzErrorCode `json:"errorCode"`
Message string `json:"message"`
}
func (a AuthzError) Error() string {
return fmt.Sprintf("AuthzError: %s - %s", a.ErrorCode, a.Message)
}