22 private readonly IHostEnvironment _hostEnvironment;
24 private readonly ILogger _logger;
34 _hostEnvironment = environment;
35 _applicationContext = applicationContext;
48 public void InspectException(Type objectType,
object businessObject,
object criteria,
string methodName, Exception ex)
56 if (_hostEnvironment.IsDevelopment())
60 string identifier = Guid.NewGuid().ToString();
61 string message = Properties.Resources.ServerSideDataPortalException + Environment.NewLine + ex.ToString();
62 _logger.LogError(message, identifier);
Provides consistent context information between the client and server DataPortal objects.
ExecutionLocations
Enum representing the locations code can execute.
LogicalExecutionLocations
Enum representing the logical execution location The setting is set to server when server is execting...
Sanitizing implementation of exception inspector, for hiding sensitive information in exception detai...
void InspectException(Type objectType, object businessObject, object criteria, string methodName, Exception ex)
Logs the exception that occurred during DataPortal call, then throws a generic, less detailed excepti...
SanitizingExceptionInspector(IHostEnvironment environment, ApplicationContext applicationContext, ILogger< SanitizingExceptionInspector > logger)
Constructor.
Sanitized server-side data portal exception; used to avoid the transmission of sensitive server-side ...
Implement this interface to check a DataPortalException before returning Exception to the client.