Helper

AggregateExceptionMessageFormatter

Magento\GraphQl\Helper\Error\AggregateExceptionMessageFormatter

What it does

This helper class formats exception messages thrown during GraphQL query execution.

It iterates through registered message formatters to find one that can handle the specific exception type, and if none match, returns a default GraphQlInputException with a generic message.

Developers use this to ensure consistent, safe error messaging in GraphQL responses while preventing sensitive internal error details from being exposed to clients.

Public Methods

  • getFormatted()