fix(client): handle REST session creation failures - #408
Merged
Conversation
Guard GET and SET requests before accessing failed REST sessions so hostname-resolution errors are returned through the command callback without terminating the worker. Use gai_strerror for resolver errors, add conditional DnsClient failure logging, and verify that the same RestClient remains usable afterward. Signed-off-by: drslebedev <dr.s.lebedev@gmail.com>
drslebedev
temporarily deployed
to
configure coverage
August 13, 2026 10:29 — with
GitHub Actions
Inactive
drslebedev
temporarily deployed
to
configure coverage
August 13, 2026 10:29 — with
GitHub Actions
Inactive
drslebedev
temporarily deployed
to
configure coverage
August 13, 2026 10:29 — with
GitHub Actions
Inactive
drslebedev
temporarily deployed
to
configure coverage
August 13, 2026 10:29 — with
GitHub Actions
Inactive
drslebedev
had a problem deploying
to
configure coverage
August 13, 2026 10:29 — with
GitHub Actions
Failure
drslebedev
temporarily deployed
to
configure coverage
August 13, 2026 10:29 — with
GitHub Actions
Inactive
drslebedev
had a problem deploying
to
configure coverage
August 13, 2026 11:03 — with
GitHub Actions
Failure
RalphSteinhagen
approved these changes
Aug 13, 2026
drslebedev
temporarily deployed
to
configure coverage
August 13, 2026 11:41 — with
GitHub Actions
Inactive
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #408 +/- ##
==========================================
+ Coverage 49.07% 49.27% +0.19%
==========================================
Files 78 78
Lines 9870 9968 +98
Branches 3727 3767 +40
==========================================
+ Hits 4844 4912 +68
+ Misses 2865 2859 -6
- Partials 2161 2197 +36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| client::Command invalidRequest; | ||
| invalidRequest.command = mdp::Command::Set; | ||
| invalidRequest.clientRequestID = opencmw::IoBuffer("unresolvable"); | ||
| invalidRequest.topic = URI<>("http://opencmw-rest-client-test.invalid:12345/dns"); |
RalphSteinhagen
pushed a commit
to fair-acc/opendigitizer
that referenced
this pull request
Aug 13, 2026
Bump OpenCMW to include fair-acc/opencmw-cpp#408 so hostname resolution failures no longer terminate OpenDigitizer. Skip empty DNS registration and unregistration requests. Signed-off-by: drslebedev <dr.s.lebedev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




A deployed OpenDigitizer service terminated when the hostname configured through
DIGITIZER_HOSTNAMEwas unavailable or could not be resolved.OpenDigitizer uses
DnsClientto register its signals through a RESTSETrequest. When hostname resolution failed,ensureSession()returned an error, but the REST client accessed the result withsession.value()without checking it first. This threwstd::bad_expected_access<std::string>from the REST worker thread and terminated the entire OpenDigitizer process.Changes
GETandSETrequests.gai_strerror()forgetaddrinfo()error codes.DnsClientquery, registration, and unregistration failures conditionally.RestClientremains usable after a hostname-resolution failure.