Skip to content

Commit

Permalink
fix(psqlutil): fix error plugin callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradub committed Jan 10, 2025
1 parent 2df84ea commit 80fc835
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions psqlutil/gorm_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ func (p GORMErrorsPlugin) Initialize(db *gorm.DB) (err error) {

return errors.Join(
cb.Create().After("gorm:create").Register("errors:after:create", p.handleError),
cb.Create().After("gorm:query").Register("errors:after:select", p.handleError),
cb.Create().After("gorm:delete").Register("errors:after:delete", p.handleError),
cb.Create().After("gorm:update").Register("errors:after:update", p.handleError),
cb.Create().After("gorm:row").Register("errors:after:row", p.handleError),
cb.Create().After("gorm:raw").Register("errors:after:raw", p.handleError),
cb.Query().After("gorm:query").Register("errors:after:select", p.handleError),
cb.Delete().After("gorm:delete").Register("errors:after:delete", p.handleError),
cb.Update().After("gorm:update").Register("errors:after:update", p.handleError),
cb.Row().After("gorm:row").Register("errors:after:row", p.handleError),
cb.Raw().After("gorm:raw").Register("errors:after:raw", p.handleError),
)
}

Expand Down

0 comments on commit 80fc835

Please sign in to comment.