Skip to content

Commit e270ef9

Browse files
committed
fix: Consider missing expiration to be an error
1 parent e12b8f1 commit e270ef9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/domain/domain.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package domain
22

33
import (
44
"context"
5+
"errors"
56
"fmt"
67
"log/slog"
78
"time"
@@ -42,6 +43,8 @@ func (d Domain) Log() *slog.Logger {
4243
return slog.With("domain", d.Name)
4344
}
4445

46+
var ErrNoExpiration = errors.New("could not find expiration date")
47+
4548
func (d *Domain) Run(ctx context.Context, integrations integration.Integrations) error {
4649
var err error
4750
d.CurrWhois, err = d.Whois()
@@ -55,8 +58,7 @@ func (d *Domain) Run(ctx context.Context, integrations integration.Integrations)
5558
l := d.Log()
5659

5760
if d.CurrWhois.Domain.ExpirationDateInTime == nil {
58-
l.Info("Could not determine expiration date")
59-
return nil
61+
return ErrNoExpiration
6062
}
6163

6264
d.ExpiresAt = d.CurrWhois.Domain.ExpirationDateInTime.Local()

0 commit comments

Comments
 (0)