Description
In src/Servy.Core/Services/ServiceManager.cs (lines 812–816):
catch (Exception ex)
{
Logger.Error($"Error getting service startup type for '{serviceName}'.", ex);
return null;
}
The error is logged, but null is returned. The same null is also returned in the normal default case (line 808) when the startup type is unrecognized.
The caller cannot distinguish between "service doesn't exist / unknown type" (normal) and "query failed due to SCM error" (problem). Both return null.
Severity
Info — ambiguous return value; logged but operationally indistinguishable.
Suggested fix
Consider using a nullable enum with a distinct "Unknown" / "Error" value, or let the exception propagate for callers that need to handle SCM failures differently.
Description
In
src/Servy.Core/Services/ServiceManager.cs(lines 812–816):The error is logged, but
nullis returned. The samenullis also returned in the normaldefaultcase (line 808) when the startup type is unrecognized.The caller cannot distinguish between "service doesn't exist / unknown type" (normal) and "query failed due to SCM error" (problem). Both return
null.Severity
Info — ambiguous return value; logged but operationally indistinguishable.
Suggested fix
Consider using a nullable enum with a distinct "Unknown" / "Error" value, or let the exception propagate for callers that need to handle SCM failures differently.