LightningWeb.CredentialLive.OAuthErrorFormatter (Lightning v2.13.5)

View Source

Provides human-readable error messages for OAuth-related errors.

This module centralizes all error message formatting to ensure consistent, helpful user feedback across the OAuth flow.

Summary

Functions

Determines the appropriate alert type for Phoenix components based on severity.

Formats an OAuth validation error into user-friendly display information.

Functions

alert_type(error_display)

Determines the appropriate alert type for Phoenix components based on severity.

format_error(arg1, provider)

Formats an OAuth validation error into user-friendly display information.

Parameters

  • error: The error to format (OauthValidation.Error or other error types)
  • provider: The OAuth provider name (e.g., "Google", "GitHub")

Returns

An ErrorDisplay struct with formatted error information