Documentation
¶
Index ¶
- func ErrorPresenter(ctx context.Context, err error) *gqlerror.Error
- func HasBadRequestError(gqlErrs *gqlerror.List) bool
- func HasInternalError(gqlErrs *gqlerror.List) bool
- func IsBadRequestError(gqlErr *gqlerror.Error) bool
- func IsInternalError(gqlErr *gqlerror.Error) bool
- func IsUnauthorizedError(gqlErr *gqlerror.Error) bool
- func NewBadRequestError(ctx context.Context, err error) *gqlerror.Error
- func NewBadRequestErrorWithMsg(ctx context.Context, err error, message string) *gqlerror.Error
- func NewInternalErrorWithMsg(ctx context.Context, err error, message string) *gqlerror.Error
- func NewUnauthorizedError(ctx context.Context, err error) *gqlerror.Error
- func NewUnauthorizedErrorWithMsg(ctx context.Context, err error, message string) *gqlerror.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorPresenter ¶
ErrorPresenter is a custom error presenter that logs the error and returns a gqlerror.Error.
func HasBadRequestError ¶ added in v0.1.14
HasBadRequestError checks if the gqlerror.List contains a bad request error.
func HasInternalError ¶ added in v0.1.14
HasInternalError checks if the gqlerror.List contains an internal server error.
func IsBadRequestError ¶ added in v0.1.14
IsBadRequestError checks if the gqlerror.Error is a bad request error.
func IsInternalError ¶ added in v0.1.14
IsInternalError checks if the gqlerror.Error is an internal server error.
func IsUnauthorizedError ¶ added in v0.1.14
IsUnauthorizedError checks if the gqlerror.Error is an unauthorized error.
func NewBadRequestError ¶
NewBadRequestError creates a new bad request error.
func NewBadRequestErrorWithMsg ¶
NewBadRequestErrorWithMsg creates a new bad request error with a message.
func NewInternalErrorWithMsg ¶
NewInternalErrorWithMsg creates a new internal server error with a message.
func NewUnauthorizedError ¶
NewUnauthorizedError creates a new unauthorized error.
Types ¶
This section is empty.