elsa-workflows/elsa-core · error · OutputConversionException
Output converter ' ' failed during for output ' ' of…
Error message
Output converter '{converterId}' failed during {stage} for output '{outputName}' of activity '{activityId}'. What it means
OutputConverterInvoker.Invoke throws an OutputConversionException with this message template when the configured converter id cannot be resolved from the IOutputConverterRegistry (stage = Resolution). Every converter failure in the pipeline is normalized into this single message; the exception's stage property tells you which step failed.
Solutions
- Correct the converter id in the output binding configuration to match a registered converter.
- Register the output converter feature/module (or the converter itself with the registry) at host startup.
- List registered converters at startup (inspect IOutputConverterRegistry) and verify the configured id exists.
- Catch OutputConversionException and inspect its Stage/ConverterId properties to pinpoint which converter configuration is wrong.
Example fix
// before
output.Converter = new OutputConverterConfiguration { Id = "json-converter" };
// after
output.Converter = new OutputConverterConfiguration { Id = "my-registered-converter-id" }; // id present in IOutputConverterRegistry Defensive patterns
Strategy: type-guard
Validate before calling
var registry = serviceProvider.GetRequiredService<IOutputConverterRegistry>();
if (output.Converter != null && registry.Find(output.Converter.Id) == null)
throw new InvalidOperationException($"Converter '{output.Converter.Id}' is not registered."); Type guard
bool IsConverterRegistered(IOutputConverterRegistry registry, string? id) => id != null && registry.Find(id) != null;
Try / catch
try { var value = invoker.Invoke(ctx, output, outputName, sourceType, raw, destination); }
catch (OutputConversionException e) when (e.Stage == OutputConversionFailureStage.Resolution)
{ logger.LogError(e, "Converter {Id} not found for output {Output}", output.Converter?.Id, outputName); } Prevention
- Keep converter ids in constants shared between registration and configuration.
- Register all converter modules in host startup before workflows run.
- Validate workflow definitions (including converter ids) at publish time.
When it happens
Trigger: An output binding's Converter configuration references a converter id (configuration.Id) that is not registered in IOutputConverterRegistry when Invoke runs, so registry.Find returns null.
Common situations: Typo in the converter id in the activity/output binding configuration; the converter feature/module registering the converter was not added to the host; converter registered under a different key or DI key mismatch.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Output converter ' ' cannot use open-generic source or…
- Output converter ID ' ' is registered more than once or…
- Output converter IDs cannot be empty.
- Output converter registration
- Secret ' ' was not found.
AI-assisted analysis of elsa-workflows/elsa-core@fe9217bdfa (2026-09-13).
Data as JSON: /api/errors/e35c30d17d9053e1.
Report an issue: GitHub.
Appendix: source
Thrown at src/modules/Elsa.Workflows.Core/Services/OutputConverterInvoker.cs:25
/// <inheritdoc />
public class OutputConverterInvoker(
IOutputConverterRegistry registry,
IOutputConverterSettingsValidator settingsValidator) : IOutputConverterInvoker
{
/// <inheritdoc />
public object? Invoke(
ActivityExecutionContext activityExecutionContext,
Output output,
string outputName,
Type sourceType,
object value,
OutputBindingDestination destination)
{
var configuration = output.Converter ?? throw new InvalidOperationException("The output binding has no converter configuration.");
var descriptor = registry.Find(configuration.Id);
if (descriptor == null)
throw CreateException(OutputConversionFailureStage.Resolution);
if (!IsRuntimeValueCompatible(value, sourceType) || !descriptor.SourceType.IsAssignableFrom(sourceType))
throw CreateException(OutputConversionFailureStage.SourceCompatibility);
if (!OutputConverterRegistry.IsAssignableToDestination(descriptor.ResultType, destination.Type))
throw CreateException(OutputConversionFailureStage.ResultValidation);
IOutputConverter converter;
try
{
converter = activityExecutionContext.WorkflowExecutionContext.ServiceProvider
.GetRequiredKeyedService<IOutputConverter>(configuration.Id);
}
catch (Exception e)
{
throw CreateException(OutputConversionFailureStage.Resolution, e);
}View on GitHub (pinned to fe9217bdfa)