NotInTheContextOfAnHttpRequestException Class
HAKOM.Persistence.Http.Net.Api.References.Exceptions
Section titled “HAKOM.Persistence.Http.Net.Api.References.Exceptions”This error occurs when no storage information is passed while deserializing a reference and the IDefaultStorageInformationProvider<TReference> registered for that type requires an HTTP context to determine the default storage information.
public sealed class NotInTheContextOfAnHttpRequestException : HAKOM.ErrorHandling.Core.Net.Api.HakomExceptionInheritance System.Object 🡒 System.Exception 🡒 HakomException 🡒 NotInTheContextOfAnHttpRequestException
Remarks
Section titled “Remarks”To avoid this issue, make sure all references of this type include a storage information property for deserialization or make sure this deserialization operation only occurs within an HTTP request.
This exception is identified by error code HK12047.
Properties
Section titled “Properties”NotInTheContextOfAnHttpRequestException.EquivalentHttpStatusCode Property
Section titled “NotInTheContextOfAnHttpRequestException.EquivalentHttpStatusCode Property”When unhandled within an HTTP request, this exception produces HTTP 400 (Bad Request).
protected override System.Net.HttpStatusCode EquivalentHttpStatusCode { protected get; }Property Value
Section titled “Property Value”NotInTheContextOfAnHttpRequestException.ReferenceTypeName Property
Section titled “NotInTheContextOfAnHttpRequestException.ReferenceTypeName Property”The name of the type of reference for which deserialization failed.
public string ReferenceTypeName { get; }Property Value
Section titled “Property Value”Was this page helpful?Thanks for your feedback!