public static GraphQLError of(final TransactionInvalidReason transactionInvalidReason) {
    return switch (transactionInvalidReason) {
      case WRONG_CHAIN_ID -> WRONG_CHAIN_ID;
      case REPLAY_PROTECTED_SIGNATURES_NOT_SUPPORTED -> REPLAY_PROTECTED_SIGNATURES_NOT_SUPPORTED;
      case INVALID_SIGNATURE -> INVALID_TRANSACTION_SIGNATURE;
      case UPFRONT_COST_EXCEEDS_BALANCE -> TRANSACTION_UPFRONT_COST_EXCEEDS_BALANCE;
      case NONCE_TOO_LOW -> NONCE_TOO_LOW;
      case NONCE_TOO_HIGH -> INCORRECT_NONCE;
      case INTRINSIC_GAS_EXCEEDS_GAS_LIMIT -> INTRINSIC_GAS_EXCEEDS_LIMIT;
      case EXCEEDS_BLOCK_GAS_LIMIT -> EXCEEDS_BLOCK_GAS_LIMIT;
      case TX_SENDER_NOT_AUTHORIZED -> TX_SENDER_NOT_AUTHORIZED;
      case CHAIN_HEAD_WORLD_STATE_NOT_AVAILABLE -> CHAIN_HEAD_WORLD_STATE_NOT_AVAILABLE;
      case GAS_PRICE_TOO_LOW -> GAS_PRICE_TOO_LOW;
      case TX_FEECAP_EXCEEDED -> TX_FEECAP_EXCEEDED;
      default -> INTERNAL_ERROR;
    };
  }
Maps a {@code TransactionInvalidReason} to a corresponding {@code GraphQLError}.

<p>This method is used to convert a transaction invalid reason to a GraphQL error, which can be
used to provide more detailed error information to the client.

@param transactionInvalidReason the transaction invalid reason to be converted.
@return the corresponding GraphQL error.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/internal/response/GraphQLError.java