Skip to content
Documentation

UnexpectedErrorDuringQueryException Class

Thrown when an unexpected error occurred during an SQL query.

public sealed class UnexpectedErrorDuringQueryException : HAKOM.ErrorHandling.Core.Net.Api.HakomException

Inheritance System.Object 🡒 System.Exception 🡒 HakomException 🡒 UnexpectedErrorDuringQueryException

This may be due to an error with the database connection or an incorrect query. Inspect the Query and QueryError properties for more information and make sure a stable connection can be maintained with the underlying database.

This exception is identified by error code HK12030.

UnexpectedErrorDuringQueryException.DatabaseErrorCode Property

Section titled “UnexpectedErrorDuringQueryException.DatabaseErrorCode Property”

Whenever available, this property will contain the System.Exception.HResult of the underlying System.Data.Common.DbException.

public int DatabaseErrorCode { get; }

System.Int32

UnexpectedErrorDuringQueryException.EquivalentHttpStatusCode Property

Section titled “UnexpectedErrorDuringQueryException.EquivalentHttpStatusCode Property”

When unhandled within an HTTP request, this exception produces HTTP 500 (Internal Server Error).

protected override System.Net.HttpStatusCode EquivalentHttpStatusCode { protected get; }

System.Net.HttpStatusCode

UnexpectedErrorDuringQueryException.Query Property

Section titled “UnexpectedErrorDuringQueryException.Query Property”

The query, which caused the problem.

public string Query { get; }

System.String

UnexpectedErrorDuringQueryException.QueryError Property

Section titled “UnexpectedErrorDuringQueryException.QueryError Property”

The error reported by the data base.

public string QueryError { get; }

System.String

UnexpectedErrorDuringQueryException.SqlState Property

Section titled “UnexpectedErrorDuringQueryException.SqlState Property”

Whenever available, this property will contain a standard SQL 5-character return code indicating the success or failure for the specific database.

public string? SqlState { get; }

System.String

© 2026 Volue.Version v0.6.38017 November 2026