You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Hetzner DNS if TTL is empty, the Zone default TTL is used. This currently isn't supported here,
Currently, when updating a record value with no explicit TTL, the following exception is thrown:
PHP Fatal error: Uncaught MehrIt\HetznerDnsApi\Exceptions\ValidationException: Record ttl must not be empty in /hetzner-api-tools/hetzner-dns-api/src/Concerns/Records.php:154
because of the following validations:
/**
* Validates the given record
* @param Record $record The record
* @throws ValidationException
*/
protected function validateRecord(Record $record): void {
if (trim($record->getName()) === '')
throw new ValidationException('Record name must not be empty');
if (trim($record->getTtl()) === '')
throw new ValidationException('Record ttl must not be empty');
if (trim($record->getType()) === '')
throw new ValidationException('Record type must not be empty');
if (trim($record->getValue()) === '')
throw new ValidationException('Record value must not be empty');
if (trim($record->getZoneId()) === '')
throw new ValidationException('Record zoneId must not be empty');
}
where
if (trim($record->getTtl()) === '')
throw new ValidationException('Record ttl must not be empty');
should simply be removed to make it work.
Empty TTL is supported and a nice and helpful feature!
The text was updated successfully, but these errors were encountered:
JPustkuchen
changed the title
Allow TTL to be empty (uses the default TTL)
Allow TTL to be empty (uses the default Zone TTL)
Aug 19, 2024
JPustkuchen
changed the title
Allow TTL to be empty (uses the default Zone TTL)
Allow TTL to be empty (to use the default Zone TTL)
Aug 19, 2024
At Hetzner DNS if TTL is empty, the Zone default TTL is used. This currently isn't supported here,
Currently, when updating a record value with no explicit TTL, the following exception is thrown:
because of the following validations:
where
should simply be removed to make it work.
Empty TTL is supported and a nice and helpful feature!
The text was updated successfully, but these errors were encountered: