Improve dns_get_record / dns_check_record error handling
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
This is in relation to https://bugs.php.net/bug.php?id=73149 (with 142 up votes) which points problematic error handling of dns_get_record.
Due to BC break, this cannot be handled as a bug fix but there is a space to improve the error handling.
Firstly it would be useful to introduce parameter to switch the error handling to throw exception (e.g. bool $throw), that would allow throwing specialized exception which would allow to identify type of the error.
Additionally it might be also useful to add retry mechanism as some failures for TRY_AGAIN error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementations and tests for dns_get_record and dns_check_record in php-src. Read the linked bug report for the existing error-handling requirements and clarify the proposed exception parameter, specialized error types, and retry behavior before changing code. Done means the agreed API behavior is documented and covered by tests without breaking existing callers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100