Wrapp error in audit service
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -38,7 +38,12 @@ func (s AuditService) Get(
|
|||||||
err := s.svc.pg.WithConn(
|
err := s.svc.pg.WithConn(
|
||||||
ctx,
|
ctx,
|
||||||
func(conn pg.Conn) error {
|
func(conn pg.Conn) error {
|
||||||
return audit.LoadByID(ctx, conn, s.svc.scope, auditID)
|
err := audit.LoadByID(ctx, conn, s.svc.scope, auditID)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("cannot load audit: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user