EndpointExtensions.ConvertToResponse<TResponse> method (1 of 2)

namespace: Serenity.Services   assemblySerenity.Net.Web

Converts the exception object to a service response

public static TResponse ConvertToResponse<TResponse>(this Exception exception, 
    HttpContext httpContext)
    where TResponse : ServiceResponse, new()
parameter description
TResponse Response object
exception Exception
httpContext HTTP context

See Also


EndpointExtensions.ConvertToResponse<TResponse> method (2 of 2)

namespace: Serenity.Services   assemblySerenity.Net.Web

Convert the exception to a service response

public static TResponse ConvertToResponse<TResponse>(this Exception exception, ILogger logger, 
    ITextLocalizer localizer, bool showDetails)
    where TResponse : ServiceResponse, new()
parameter description
TResponse
exception Exception
logger Exception logger
localizer Text localizer
showDetails True to show details

See Also