Log in
Helper

PaymentExceptionMessageFormatter

Magento\GraphQl\Helper\Error\MessageFormatters\PaymentExceptionMessageFormatter

What it does

This helper class formats error messages specifically for payment-related exceptions in GraphQL responses.

When a PaymentException occurs during GraphQL query execution, it preserves the original payment error message (which typically contains important details for the user) instead of replacing it with a generic error message.

Developers would use this to ensure payment-specific error information is properly communicated through the GraphQL API.

Public Methods

  • getFormatted()