HAKOM.Http.Core.Net.Api.Exceptions Namespace
Contains exception types raised by the HTTP core infrastructure during service configuration and startup.
Remarks
Section titled “Remarks”All exceptions in this namespace inherit from HakomException
and carry a unique HK##### error code. Each exception also specifies an
System.Net.HttpStatusCode that middleware can map to an HTTP response.
These exceptions are typically thrown during the Setup(string[]) lifecycle when the hosting configuration is invalid or incomplete:
- CannotConfigureByUrlAndEndpointException (HK10003) – both
UrlsandEndpointsare present. - EmptyEndpointConfigurationUrlException (HK10004) – an
Endpointsentry is missing itsUrl. - DuplicateEndpointUrlSettingException (HK10005) – multiple
Urlelements in one endpoint node. - CouldNotReadServiceSettingsException – strongly-typed service settings could not be bound.
- NoTitleForAssemblyException (HK10002) – the service assembly lacks an System.Reflection.AssemblyTitleAttribute.
- NoDescriptionForAssemblyException (HK10001) – the service assembly lacks an System.Reflection.AssemblyDescriptionAttribute.
| Classes | |
|---|---|
| CannotConfigureByUrlAndEndpointException | Indicates that an attempt was made to configure the service’s URL with both the (old) Urls element and the (new) Endpoints element. |
| CouldNotReadServiceSettingsException | Indicates that the service’s settings could not be read from the configuration source. |
| DuplicateEndpointUrlSettingException | Indicates that multiple Url elements were found in one Endpoint node. |
| EmptyEndpointConfigurationUrlException | Indicates that an attempt was made to configure the service’s URL with an Endpoints element, but the Url was missing. |
| InvalidDefaultAcceptHeaderException | Indicates that the DefaultAcceptHeader hosting setting was configured with a value that is not a valid media type. |
| InvalidSupportedCulturesException | Indicates that an attempt was made to configure the service with invalid culture codes in the SupportedCultures setting. |
| NoDescriptionForAssemblyException | This exception is thrown when an attempt is made to register IServiceInformation that is based on an assembly yet that assembly does not contain an System.Reflection.AssemblyDescriptionAttribute. |
| NoTitleForAssemblyException | This exception is thrown when an attempt is made to register IServiceInformation that is based on an assembly yet that assembly does not contain a System.Reflection.AssemblyTitleAttribute. |
Was this page helpful?Thanks for your feedback!