Table of Contents

Class UnhandledExceptionEvent

Namespace
Fdyay.IdentityServer.Events
Assembly
Fdyay.IdentityServer.Core.dll

A protocol endpoint threw.

public class UnhandledExceptionEvent : Event
Inheritance
UnhandledExceptionEvent
Inherited Members

Remarks

The first event of type Error this server has. EventsOptions.RaiseErrorEvents shipped in 0.12.0 and DefaultEventService read it from the start, but nothing ever raised an event of that type — so the flag gated a category with no members, and a host could switch it on, register a sink and correctly receive nothing forever.

Raising this is not handling the exception. The middleware records the fault and rethrows: an event is a record, and swallowing the exception in order to report it would take away the host's own logging, its error page and the status code the caller is owed.

The exception's type and message travel; the stack trace does not, unless the host asks for it with EventsOptions.IncludeStackTraceInUnhandledExceptionEvents. A stack trace names this server's internals and sometimes the values it was working on, and an event goes somewhere with a wider audience than a log — where the exception itself, with its stack, has already been handed to the host. Duende's Details is the whole Exception.ToString(), always; here that is the opt-in (the decision of 2026-10-13).

Constructors

UnhandledExceptionEvent(Exception, string)

A fault at endpoint, described by the exception's type and message.

public UnhandledExceptionEvent(Exception exception, string endpoint)

Parameters

exception Exception

What was thrown; its type and message become Message and Details.

endpoint string

The request path the fault happened on.

Exceptions

ArgumentNullException

exception is null.

Properties

Details

What went wrong: the exception's type and message, and its stack only where the host asked. Duende's.

public string? Details { get; set; }

Property Value

string

Remarks

By default the same text as Message. With EventsOptions.IncludeStackTraceInUnhandledExceptionEvents on, the middleware sets it to the exception's ToString() — its type, message, stack and inner exceptions — which is Duende's value.

Endpoint

The path the request was on, so a fault names the endpoint that produced it.

public string Endpoint { get; }

Property Value

string