Fix wrong error type

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-02-06 09:36:07 +01:00
parent 64fbad061d
commit a9a2e75c59
2 changed files with 3 additions and 5 deletions

View File

@@ -21,7 +21,6 @@ import (
"strings"
"time"
"github.com/jackc/pgx/v5"
"go.gearno.de/kit/log"
"go.gearno.de/kit/pg"
"go.gearno.de/x/ref"
@@ -227,7 +226,7 @@ func (p *Provisioner) resetStaleDomain(
) error {
fullDomain := &coredata.CustomDomain{}
if err := fullDomain.LoadByIDForUpdateSkipLocked(ctx, tx, coredata.NewNoScope(), p.encryptionKey, domain.ID); err != nil {
if errors.Is(err, pgx.ErrNoRows) {
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil
}
@@ -276,7 +275,7 @@ func (p *Provisioner) provisionDomainCertificate(
) error {
domain := &coredata.CustomDomain{}
if err := domain.LoadByIDForUpdateSkipLocked(ctx, tx, coredata.NewNoScope(), p.encryptionKey, domainID); err != nil {
if errors.Is(err, pgx.ErrNoRows) {
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil
}

View File

@@ -20,7 +20,6 @@ import (
"fmt"
"time"
"github.com/jackc/pgx/v5"
"go.gearno.de/kit/log"
"go.gearno.de/kit/pg"
"go.probo.inc/probo/pkg/coredata"
@@ -132,7 +131,7 @@ func (r *Renewer) checkAndRenew(ctx context.Context) error {
func (r *Renewer) renewDomain(ctx context.Context, tx pg.Conn, domainID gid.GID) error {
domain := &coredata.CustomDomain{}
if err := domain.LoadByIDForUpdateSkipLocked(ctx, tx, coredata.NewNoScope(), r.encryptionKey, domainID); err != nil {
if errors.Is(err, pgx.ErrNoRows) {
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil
}