EndpointExtensions.ConvertToResponse<TResponse> method (1 of 2)
namespace: Serenity.Services assembly: Serenity.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
- class TResponse
- class ServiceResponse
- class EndpointExtensions
EndpointExtensions.ConvertToResponse<TResponse> method (2 of 2)
namespace: Serenity.Services assembly: Serenity.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
- class TResponse
- interface ITextLocalizer
- class ServiceResponse
- class EndpointExtensions