More protections for oauth being expired

This commit is contained in:
Eli Ribble 2026-04-16 20:43:40 +00:00
parent a922196f20
commit b3a89d9c68
No known key found for this signature in database

View file

@ -253,10 +253,16 @@ func getFieldseeker(ctx context.Context, org *models.Organization) (*fieldseeker
if err != nil {
return nil, fmt.Errorf("get oauth for org: %w", err)
}
if oauth == nil {
return nil, fmt.Errorf("no live oauth for org %d", org.ID)
}
fssync, err = newFieldSeeker(
ctx,
oauth,
)
if err != nil {
return nil, fmt.Errorf("failed to create fieldseeker: %w", err)
}
clientByOrgID[org.ID] = fssync
return fssync, nil
}