HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Method AddApiExceptionHandler

    AddApiExceptionHandler(IServiceCollection)

    Registers the default ApiExceptionHandler, which reports API exceptions as-is and logs unexpected exceptions with a reference ID that is reported to the client (or propagates them in development environments).

    Declaration
    public static IServiceCollection AddApiExceptionHandler(this IServiceCollection services)
    Parameters
    Type Name Description
    IServiceCollection services
    Returns
    Type Description
    IServiceCollection

    AddApiExceptionHandler<THandler>(IServiceCollection)

    Registers an IApiExceptionHandler that maps exceptions thrown during request processing to the errors reported to clients. Derive from ApiExceptionHandler to customize the default behavior with application-specific exception mappings.

    Declaration
    public static IServiceCollection AddApiExceptionHandler<THandler>(this IServiceCollection services) where THandler : class, IApiExceptionHandler
    Parameters
    Type Name Description
    IServiceCollection services
    Returns
    Type Description
    IServiceCollection
    Type Parameters
    Name Description
    THandler

    The handler type.

    © Singulink. All rights reserved.