chore: wrap errors to custom errors

This commit is contained in:
adlerhurst
2025-07-17 00:54:21 +02:00
parent 75a04e83ae
commit f8934b0c88
10 changed files with 331 additions and 69 deletions

View File

@@ -41,10 +41,10 @@ type Config struct {
func (c *Config) Connect(ctx context.Context) (database.Pool, error) {
pool, err := c.getPool(ctx)
if err != nil {
return nil, err
return nil, wrapError(err)
}
if err = pool.Ping(ctx); err != nil {
return nil, err
return nil, wrapError(err)
}
return &pgxPool{Pool: pool}, nil
}