nopSolutions/nopCommerce · error · NopException
{aggregated error summaries}
Error message
{aggregated error summaries} What it means
CreateTransaction received a TransactionModel, but its messages array contained entries whose severity is not "success". Avalara returns non-fatal messages alongside a transaction; the plugin aggregates every non-success message.summary into one string and throws so the merchant sees all of them at once. Unlike a null response, the call technically succeeded but Avalara flagged issues.
Source
Thrown at src/Plugins/Nop.Plugin.Tax.Avalara/Services/AvalaraTaxManager.cs:239
/// <summary>
/// Create tax transaction
/// </summary>
/// <param name="model">Transaction details</param>
/// <returns>Created transaction</returns>
protected TransactionModel CreateTransaction(CreateTransactionModel model)
{
var transaction = ServiceClient.CreateTransaction(null, model)
?? throw new NopException("No response from the service");
//whether there are any errors
var errors = transaction.messages?.Where(m => !m.severity?.ToLower().Equals("success") ?? true).ToList() ?? [];
if (!errors.Any())
return transaction;
var message = errors.Aggregate(string.Empty, (error, message) => $"{error}{message.summary}{Environment.NewLine}");
throw new NopException(message);
}
/// <summary>
/// Prepare model to create a tax transaction
/// </summary>
/// <param name="address">Tax address</param>
/// <param name="customerCode">Customer code</param>
/// <param name="documentType">Transaction document type</param>
/// <returns>
/// A task that represents the asynchronous operation
/// The task result contains the model
/// </returns>
protected async Task<CreateTransactionModel> PrepareTransactionModelAsync(Address address, string customerCode, DocumentType documentType)
{
var model = new CreateTransactionModel
{
customerCode = CommonHelper.EnsureMaximumLength(customerCode, 50),
date = DateTime.UtcNow,View on GitHub (pinned to 64bdf2ff08)
Solutions
- Read the aggregated message text - it names the exact issue (address, tax code, nexus, jurisdiction).
- Fix the specific Avalara-side condition: add Nexus for the state, correct the tax code mapping, or validate the address.
- If the warnings are acceptable for your workflow, review address-validation strictness and tax-code mappings in the plugin settings.
- Verify each transaction line's taxCode, itemCode, amount, and quantity match Avalara's expectations.
Example fix
// before
var message = errors.Aggregate(string.Empty, (error, message) => $"{error}{message.summary}{Environment.NewLine}");
throw new NopException(message);
// after - group by severity for actionable detail
var grouped = errors.GroupBy(m => m.severity?.ToLower() ?? "unknown");
var detail = string.Join(Environment.NewLine, grouped.Select(g => $"[{g.Key}] {string.Join("; ", g.Select(m => m.summary))}"));
throw new NopException($"Avalara returned {errors.Count} non-success message(s):{Environment.NewLine}{detail}"); Defensive patterns
Strategy: try-catch
Validate before calling
// Nothing to validate up front - Avalara returns the messages at runtime.
// Pre-validate address/tax-code mappings to reduce warnings:
var addressOk = !string.IsNullOrEmpty(addr?.postalCode) ||
(!string.IsNullOrEmpty(addr?.line1) && !string.IsNullOrEmpty(addr?.city) && !string.IsNullOrEmpty(addr?.region)); Try / catch
// Distinguish aggregated-message failures from hard errors so the UI can show Avalara's text
try
{
var tx = CreateTransaction(model);
}
catch (NopException ex) when (ex.Message.Contains("summary") || ex.Message.Contains("Avalara returned"))
{
// Avalara business messages - log as warning, surface summary to the merchant
await _logger.WarningAsync($"Avalara transaction warnings: {ex.Message}");
throw;
} Prevention
- Keep tax-code mappings current with Avalara's active codes to avoid auto-overwrite warnings.
- Configure Nexus for every state you ship into to avoid jurisdiction-guess messages.
- Validate addresses (postal code / full address) before submitting to reduce address warnings.
- Log and triage recurring message summaries - they flag stale configuration.
When it happens
Trigger: Avalara returns messages with severity "Warning" or "Error" (e.g., address validation warnings, tax code auto-overrides, jurisdiction guesses, or missing-nexus notices). Any single non-success severity triggers the aggregate throw, even when tax was computed.
Common situations: Shipping address that fails validation but is still taxable; tax code mapped to an inactive or replaced Avalara code; Nexus not fully configured so Avalara guesses the jurisdiction; cross-border transactions lacking exemption certificate handling; PCard or entity-use-code mismatches.
Related errors
- No response from the service
- Address not set
- Address is incomplete
- Item HS classification error: {error}
- Email is not valid.
AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13).
Data as JSON: /api/errors/586c47c0b76d9b47.
Report an issue: GitHub.