Class EnvironmentOnlySettingMisplacedException
- Namespace
- MailFathom.Host.Configuration
- Assembly
- MailFathom.Host.dll
Indicates that a setting only the process environment can deliver was given its value somewhere else.
public sealed class EnvironmentOnlySettingMisplacedException : MailFathomException, ISerializable
- Inheritance
-
EnvironmentOnlySettingMisplacedException
- Implements
- Inherited Members
Remarks
The failure exists because the mistake it names is otherwise invisible. A value written into an appsettings.json
file, a provisioned configuration file, or a command-line argument is accepted by the configuration pipeline and can
be read back out of it, so nothing about the deployment looks wrong; the reader that needed it had already taken its
value from the environment, or reads only the environment and never consults configuration at all. The result is a
setting an operator can point at in their own file while the process behaves as though it were unset.
The message names the variables and never their values. A variable name is MailFathom's or the platform's own name
for a setting, in the same class as an account alias; a value is whatever the deployment put there, which for
OTEL_EXPORTER_OTLP_HEADERS is a collector's credential and for OPENSSL_CONF is a path into the
deployment's own filesystem. Naming what to do with each is what the reader needs, and the value is already in front
of them.
Constructors
- EnvironmentOnlySettingMisplacedException(string)
Initializes a new failure naming the settings whose configured value reaches no reader.
Properties
- ErrorCode
Gets the stable code identifying this failure to a boundary that must report it without naming a type.