mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-14 06:06:15 +01:00
Fix fmt.Errorf issue in PostPhoto
This commit is contained in:
parent
607fde717d
commit
00e6b3de7b
1 changed files with 4 additions and 2 deletions
|
@ -18,7 +18,8 @@ func (db *appdbimpl) PostPhoto(uid string) (DBTransaction, int64, error) {
|
|||
err_rb := tx.Rollback()
|
||||
// If rollback fails, we return the original error plus the rollback error
|
||||
if err_rb != nil {
|
||||
err = fmt.Errorf("%w; %w", err, err_rb)
|
||||
// todo: we are losing track of err_rb here
|
||||
err = fmt.Errorf("Rollback error. Rollback cause: %w", err)
|
||||
}
|
||||
|
||||
return nil, 0, err
|
||||
|
@ -29,7 +30,8 @@ func (db *appdbimpl) PostPhoto(uid string) (DBTransaction, int64, error) {
|
|||
err_rb := tx.Rollback()
|
||||
// If rollback fails, we return the original error plus the rollback error
|
||||
if err_rb != nil {
|
||||
err = fmt.Errorf("%w; %w", err, err_rb)
|
||||
// todo: we are losing track of err_rb here
|
||||
err = fmt.Errorf("Rollback error. Rollback cause: %w", err)
|
||||
}
|
||||
|
||||
return nil, 0, err
|
||||
|
|
Loading…
Reference in a new issue