Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 22, 2025

Addresses missing documentation for the mapCryptoExceptionToErrorCode helper method introduced in PR #2844, as noted in review comment #2641260485.

Changes

  • Added comprehensive Javadoc to mapCryptoExceptionToErrorCode documenting:
    • Purpose: maps cryptographic exceptions to ClientException error code constants
    • Parameter: the exception to map (non-null)
    • Return value: corresponding error code constant with INVALID_KEY as default fallback
    • Usage context: shared by both encrypt and decrypt operations for consistent error mapping
/**
 * Maps cryptographic exceptions to corresponding ClientException error code constants.
 * This helper method is used by both encrypt and decrypt operations to provide consistent
 * error code mappings for various cryptographic failure scenarios.
 *
 * @param e The exception to map to an error code. Must be non-null.
 * @return The corresponding ClientException error code constant. Returns {@link ClientException#INVALID_KEY}
 *         as the default fallback when the exception type doesn't match any known types.
 */
private String mapCryptoExceptionToErrorCode(@NonNull final Exception e) { ... }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

somalaya and others added 3 commits December 22, 2025 12:08
Copilot AI self-assigned this Dec 22, 2025
Copilot AI and others added 2 commits December 22, 2025 21:27
Co-authored-by: somalaya <69237821+somalaya@users.noreply.github.com>
Co-authored-by: somalaya <69237821+somalaya@users.noreply.github.com>
Copilot AI changed the title [WIP] Update telemetry for encrypt and decrypt operations Add Javadoc documentation to mapCryptoExceptionToErrorCode helper method Dec 22, 2025
Copilot AI requested a review from somalaya December 22, 2025 21:34
@somalaya somalaya force-pushed the somalaya/addTelemetry branch 2 times, most recently from 804f98a to 7d2e957 Compare December 26, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants