Skip to main content

DataverseAuthenticationException

  • Namespace: PPDS.Dataverse.Resilience
  • Assembly: PPDS.Dataverse
  • Kind: Class
  • Base: Exception
  • Implements: ISerializable

Summary

Exception thrown when a Dataverse operation fails due to authentication or authorization issues.

Members

Constructors

DataverseAuthenticationException(string userMessage, bool requiresReauthentication, Exception innerException)

DataverseAuthenticationException(string userMessage, bool requiresReauthentication, Exception innerException)

Creates a new authentication exception.

  • Param userMessage: A user-friendly error message.

  • Param requiresReauthentication: Whether re-authentication is required.

  • Param innerException: The original exception.

DataverseAuthenticationException(string userMessage, bool requiresReauthentication, string connectionName, string failedOperation, Exception innerException)

DataverseAuthenticationException(string userMessage, bool requiresReauthentication, string connectionName, string failedOperation, Exception innerException)

Creates a new authentication exception with context.

  • Param userMessage: A user-friendly error message.

  • Param requiresReauthentication: Whether re-authentication is required.

  • Param connectionName: The connection that failed.

  • Param failedOperation: The operation that was being performed.

  • Param innerException: The original exception.

Methods

FromException

DataverseAuthenticationException FromException(Exception exception, string connectionName, string failedOperation)

Creates an authentication exception from an existing exception.

  • Param exception: The original exception.

  • Param connectionName: The connection that failed.

  • Param failedOperation: The operation that was being performed.

  • Returns: A new DataverseAuthenticationException.

Properties

ConnectionName

string ConnectionName { get; }

Gets the name of the connection that experienced the auth failure.

FailedOperation

string FailedOperation { get; }

Gets the operation that was being performed when auth failed.

RequiresReauthentication

bool RequiresReauthentication { get; }

Gets whether the user needs to re-authenticate to continue.

UserMessage

string UserMessage { get; }

Gets a message safe to display to end users.