cloudflare-php
cloudflare-php copied to clipboard
feat(Endpoints\DNS): getRecordID to throw exception like Zones::getZoneID
Feature request to make the Endpoints match how they handle not finding the ID requested. Throw appears to be the better pattern since the return type. Since previous was returning false and casting it to empty string due to return type, but for better future proof and possible issues with strict mode would be safer to throw.
IMPORTANT: It will break existing logic that is written to expect empty string instead of throw. This change should be included in next major version bump.
Closes issue: https://github.com/cloudflare/cloudflare-php/issues/140
This should be a ResponseException
to match exceptions like 'record already exist'.
Please commit this change otherwise it brakes code with a type error. It's not possible to catch this error unless you catch type exceptions (very bad!).
This issue is now hanging here for almost 3 years.