Skip to content

Commit 57f4db5

Browse files
committed
fix: handle error in payroll processing to ensure proper transaction completion
1 parent a4ba293 commit 57f4db5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/core/services/payroll_service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ func (s *payrollService) ProcessPayroll(ctx context.Context, payrollID uuid.UUID
218218
ID: payrollID,
219219
Status: domain.PayrollStatusCompleted,
220220
})
221+
222+
if err != nil {
223+
return nil, err
224+
}
221225
}
222226

223227
return transactions, nil

0 commit comments

Comments
 (0)