Skip to content

Commit

Permalink
feat: wrap error with ErrorDetails in oops plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed Oct 27, 2024
1 parent 87325bc commit 455555d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/oops-plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (p oopsPlugin) Initialize(db *gorm.DB) (err error) {
func (p *oopsPlugin) after() gormHookFunc {
return func(tx *gorm.DB) {
if tx.Error != nil {
tx.Error = oops.Tags("db").Wrap(tx.Error)
tx.Error = oops.Tags("db").Wrap(ErrorDetails(tx.Error))
}
}
}

0 comments on commit 455555d

Please sign in to comment.