Skip to content

fix: return error from rdapQuery when no expiration event found#1603

Merged
TwiN merged 2 commits into
TwiN:masterfrom
majiayu000:fix/issue-1570-domain-expiration-rdap-fallback
Apr 1, 2026
Merged

fix: return error from rdapQuery when no expiration event found#1603
TwiN merged 2 commits into
TwiN:masterfrom
majiayu000:fix/issue-1570-domain-expiration-rdap-fallback

Conversation

@majiayu000

Copy link
Copy Markdown
Contributor

Fixes #1570

rdapQuery() was silently returning a zero-value ExpirationDate when the RDAP
response didn't contain an expiration event. This meant GetDomainExpiration never
fell back to WHOIS for domains like .net where RDAP might not include expiration data.

Added a check after the event loop: if ExpirationDate is still zero, return an error
so the caller falls back to WHOIS as intended (client.go:73-74).

Also added a test case for a .net domain in TestRdapQuery.

When an RDAP response has no expiration event, rdapQuery returned a
zero-value ExpirationDate with nil error. This prevented
GetDomainExpiration from falling back to WHOIS, causing failures
for TLDs like .net where RDAP may omit the expiration event.

Signed-off-by: majiayu000 <1835304752@qq.com>
Add .net domain test cases to TestRdapQuery and TestGetDomainExpiration
to cover the fallback path when RDAP lacks an expiration event (TwiN#1570).
Include hostname in the error message for easier debugging.

Signed-off-by: majiayu000 <1835304752@qq.com>
@github-actions github-actions Bot added the bug Something isn't working label Mar 28, 2026
@majiayu000 majiayu000 marked this pull request as ready for review March 28, 2026 10:03
@TwiN TwiN merged commit f4428aa into TwiN:master Apr 1, 2026
3 of 4 checks passed
@TwiN TwiN added the area/client Related to client label Apr 1, 2026
@TwiN

TwiN commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Thank you for the contribution!

@n3gwg

n3gwg commented Apr 1, 2026

Copy link
Copy Markdown

I stand most greatly appreciative of everyone that looked into this issue.
Might I ask how I will know when this new code has made it into the next version of the container or what version number would represent this code fix?

The reason I am asking is because I just entirely deleted and downloaded whatever is the currently available version of the container which states it is 7 hours old and I see that the code was merged 7 hours ago. Thus, I presume the container I have is the latest code. If so, then I sadly must state that the bug seems to be remaining stubbornly persistent. However, if I simply must wait a bit longer for the latest code to merge into the container I understand entirely.

Stuart, N3GWG

@TwiN

TwiN commented Apr 2, 2026

Copy link
Copy Markdown
Owner

It should be available under the latest tag, but you may still have it cached. FWIW there was a build issue yesterday that I just fixed, so maybe that was the issue

@n3gwg

n3gwg commented Apr 5, 2026

Copy link
Copy Markdown

I downloaded this image:
$ docker images
docker.io/twinproduction/gatus latest a405b2f3eaf3 36 hours ago 49.4 MB

It seems to still have the bug persistent. Am I using the proper image that has the fix in it or is this wrong?

Thanks for your hard work on this thus far!

Stuart, N3GWG

doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request May 20, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.35.0` → `v5.36.0` |

---

### Release Notes

<details>
<summary>TwiN/gatus (ghcr.io/twin/gatus)</summary>

### [`v5.36.0`](https://github.com/TwiN/gatus/releases/tag/v5.36.0)

[Compare Source](TwiN/gatus@v5.35.0...v5.36.0)

##### What's Changed

- perf: Add PostgreSQL indexes for \~15x performance improvement by [@&#8203;ozanonurtek](https://github.com/ozanonurtek) in [#&#8203;1541](TwiN/gatus#1541)
- fix(alerting): Remove square brackets from email subject by [@&#8203;jaydeethree](https://github.com/jaydeethree) in [#&#8203;1586](TwiN/gatus#1586)
- fix(security): Do not allow invalid security configs by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1531](TwiN/gatus#1531)
- fix: return error from rdapQuery when no expiration event found by [@&#8203;majiayu000](https://github.com/majiayu000) in [#&#8203;1603](TwiN/gatus#1603)
- fix(ci): regenerate-static-assets workflow reporting false errors on success by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;1614](TwiN/gatus#1614)
- feat(ui): Add customizable OIDC login screen branding by [@&#8203;hluaces](https://github.com/hluaces) in [#&#8203;1583](TwiN/gatus#1583)
- fix(test): Remove t.Parallel() from tests racing on injectedHTTPClient by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;1630](TwiN/gatus#1630)
- fix(storage): close rows before nested queries to prevent PostgreSQL driver error by [@&#8203;osalloum](https://github.com/osalloum) in [#&#8203;1503](TwiN/gatus#1503)
- docs: Document remote.client configuration by [@&#8203;surdaft](https://github.com/surdaft) in [#&#8203;1637](TwiN/gatus#1637)
- fix: update lib/pq to v1.11.2 to fix Supabase PostgreSQL connection regression by [@&#8203;wahajahmed010](https://github.com/wahajahmed010) in [#&#8203;1644](TwiN/gatus#1644)

##### New Contributors

- [@&#8203;ozanonurtek](https://github.com/ozanonurtek) made their first contribution in [#&#8203;1541](TwiN/gatus#1541)
- [@&#8203;jaydeethree](https://github.com/jaydeethree) made their first contribution in [#&#8203;1586](TwiN/gatus#1586)
- [@&#8203;majiayu000](https://github.com/majiayu000) made their first contribution in [#&#8203;1603](TwiN/gatus#1603)
- [@&#8203;hluaces](https://github.com/hluaces) made their first contribution in [#&#8203;1583](TwiN/gatus#1583)
- [@&#8203;osalloum](https://github.com/osalloum) made their first contribution in [#&#8203;1503](TwiN/gatus#1503)
- [@&#8203;surdaft](https://github.com/surdaft) made their first contribution in [#&#8203;1637](TwiN/gatus#1637)
- [@&#8203;wahajahmed010](https://github.com/wahajahmed010) made their first contribution in [#&#8203;1644](TwiN/gatus#1644)

**Full Changelog**: <TwiN/gatus@v5.35.0...v5.36.0>

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xODIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE4Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/82
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request May 20, 2026
…(#577)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.35.0` → `v5.36.0` |

---

### Release Notes

<details>
<summary>TwiN/gatus (ghcr.io/twin/gatus)</summary>

### [`v5.36.0`](https://github.com/TwiN/gatus/releases/tag/v5.36.0)

[Compare Source](TwiN/gatus@v5.35.0...v5.36.0)

##### What's Changed

- perf: Add PostgreSQL indexes for \~15x performance improvement by [@&#8203;ozanonurtek](https://github.com/ozanonurtek) in [#&#8203;1541](TwiN/gatus#1541)
- fix(alerting): Remove square brackets from email subject by [@&#8203;jaydeethree](https://github.com/jaydeethree) in [#&#8203;1586](TwiN/gatus#1586)
- fix(security): Do not allow invalid security configs by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1531](TwiN/gatus#1531)
- fix: return error from rdapQuery when no expiration event found by [@&#8203;majiayu000](https://github.com/majiayu000) in [#&#8203;1603](TwiN/gatus#1603)
- fix(ci): regenerate-static-assets workflow reporting false errors on success by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;1614](TwiN/gatus#1614)
- feat(ui): Add customizable OIDC login screen branding by [@&#8203;hluaces](https://github.com/hluaces) in [#&#8203;1583](TwiN/gatus#1583)
- fix(test): Remove t.Parallel() from tests racing on injectedHTTPClient by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;1630](TwiN/gatus#1630)
- fix(storage): close rows before nested queries to prevent PostgreSQL driver error by [@&#8203;osalloum](https://github.com/osalloum) in [#&#8203;1503](TwiN/gatus#1503)
- docs: Document remote.client configuration by [@&#8203;surdaft](https://github.com/surdaft) in [#&#8203;1637](TwiN/gatus#1637)
- fix: update lib/pq to v1.11.2 to fix Supabase PostgreSQL connection regression by [@&#8203;wahajahmed010](https://github.com/wahajahmed010) in [#&#8203;1644](TwiN/gatus#1644)

##### New Contributors

- [@&#8203;ozanonurtek](https://github.com/ozanonurtek) made their first contribution in [#&#8203;1541](TwiN/gatus#1541)
- [@&#8203;jaydeethree](https://github.com/jaydeethree) made their first contribution in [#&#8203;1586](TwiN/gatus#1586)
- [@&#8203;majiayu000](https://github.com/majiayu000) made their first contribution in [#&#8203;1603](TwiN/gatus#1603)
- [@&#8203;hluaces](https://github.com/hluaces) made their first contribution in [#&#8203;1583](TwiN/gatus#1583)
- [@&#8203;osalloum](https://github.com/osalloum) made their first contribution in [#&#8203;1503](TwiN/gatus#1503)
- [@&#8203;surdaft](https://github.com/surdaft) made their first contribution in [#&#8203;1637](TwiN/gatus#1637)
- [@&#8203;wahajahmed010](https://github.com/wahajahmed010) made their first contribution in [#&#8203;1644](TwiN/gatus#1644)

**Full Changelog**: <TwiN/gatus@v5.35.0...v5.36.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/577
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client Related to client bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

domain_expiration function is jacked up

3 participants