Use Tobi's style for wrapping errors

This commit is contained in:
Vyr Cossont 2025-01-20 22:26:03 -08:00
commit 4f39da77bb
5 changed files with 20 additions and 26 deletions

View file

@ -31,9 +31,8 @@ func (p *Processor) Delete(ctx context.Context, accessToken string) gtserror.Wit
}
if err := p.state.DB.DeleteWebPushSubscriptionByTokenID(ctx, tokenID); err != nil {
return gtserror.NewErrorInternalError(
gtserror.Newf("couldn't delete Web Push subscription for token ID %s: %w", tokenID, err),
)
err := gtserror.Newf("couldn't delete Web Push subscription for token ID %s: %w", tokenID, err)
return gtserror.NewErrorInternalError(err)
}
return nil