Documentation
¶
Overview ¶
Package errors provides database error utilities and translation to gokit AppError types for consistent error handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromDatabase ¶
FromDatabase converts a database error to an AppError. It translates GORM and database-specific errors to user-friendly messages.
func IsConnectionError ¶
IsConnectionError checks if a database error is a connection error that might be resolved by retrying.
func IsDuplicateError ¶
IsDuplicateError checks if the error is a GORM duplicate-key violation.
func IsNotFoundError ¶
IsNotFoundError checks if the error is a GORM record-not-found error.
func IsRetryableError ¶
IsRetryableError determines if a database error should trigger a retry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.