Documentation ¶
Index ¶
- func APIError(ctx context.Context, w http.ResponseWriter, code int, err error)
- func From(ctx context.Context, code codes.Code, err error) error
- func IsGormNotFound(err error) bool
- func IsPostgresForeignKeyViolationError(err error) bool
- func IsPostgresNotNullConstraintViolationError(err error) bool
- func IsPostgresUniqueConstraintViolationError(err error) bool
- func New(ctx context.Context, code codes.Code, msg string) error
- func Newf(ctx context.Context, code codes.Code, format string, args ...interface{}) error
- func Plain(ctx context.Context, code codes.Code) error
- func SendToSentry(ctx context.Context, code codes.Code, err error)
- func TryConvertPostgresError(err error) (*pgconn.PgError, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGormNotFound ¶
IsGormNotFound returns true if error is related to gorm.ErrRecordNotFound.
func IsPostgresForeignKeyViolationError ¶
IsPostgresForeignKeyViolationError returns true if error is related to foreign key violation.
func IsPostgresNotNullConstraintViolationError ¶
IsPostgresNotNullConstraintViolationError returns true if error is related to not null constraint.
func IsPostgresUniqueConstraintViolationError ¶
IsPostgresUniqueConstraintViolationError returns true if error is related to unique constraint.
func SendToSentry ¶
SendToSentry sends an error event to sentry to be captured.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.