BoundaryML/baml · error · RenderError
Type '{0}' is not supported in outputs
Error message
Type '{0}' is not supported in outputs What it means
RenderError::UnsupportedType is raised when the output_format renderer encounters a type it cannot represent in rendered outputs. The '{0}' placeholder is the type's display string. The renderer supports a fixed set of output types; anything else (e.g. certain generics, images, or internal-only types) is rejected with this error.
Source
Thrown at baml_language/crates/sys_ops/src/output_format.rs:15
use std::fmt::Write as _;
use ::sys_types::SapTy;
use baml_base::Literal as LiteralValue;
use indexmap::IndexMap;
use thiserror::Error;
/// Error type for output format rendering.
#[derive(Clone, Debug, Error)]
pub enum RenderError {
#[error("Enum '{0}' not found")]
EnumNotFound(String),
#[error("Class '{0}' not found")]
ClassNotFound(String),
#[error("Type '{0}' is not supported in outputs")]
UnsupportedType(String),
#[error(
"Non-regular recursive generic class '{class}' expands from '{ancestor}' to '{instantiation}'"
)]
NonRegularRecursiveGeneric {
class: String,
ancestor: String,
instantiation: String,
},
#[error(
"Output definitions '{first}' and '{second}' both render as '{rendered_name}' in the output schema"
)]
RenderedClassNameCollision {
rendered_name: String,
first: String,
second: String,
},
#[error(View on GitHub (pinned to bd85ce9dee)
Solutions
- Change the output schema field to a supported type (primitive, supported class/enum, list/map)
- Upgrade the library if the type should be supported in a newer version
- Strip or transform unsupported fields before rendering
- Check release notes for the supported output type matrix
Example fix
// before
class Result { image Image }
// after
class Result { image_url string } Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = new Set(['string','int','float','bool','list','map','class','enum']);
function allFieldsSupported(schema) {
return schema.fields.every(f => SUPPORTED.has(f.type.kind));
}
// call before render: allFieldsSupported(outputSchema) Type guard
function isUnsupportedTypeError(e) {
return e instanceof Error && /Type '.*' is not supported in outputs/.test(e.message);
} Try / catch
try {
rendered = render(value, registry);
} catch (e) {
if (isUnsupportedTypeError(e)) {
rendered = stripUnsupported(value); // drop/serialize unrepresentable fields
} else throw e;
} Prevention
- Keep output schemas within the renderer's supported type matrix
- Upgrade the library before using newly introduced type kinds in outputs
- Transform media/internal types to string representations pre-render
- Add schema linting that rejects unsupported output field kinds
When it happens
Trigger: Declaring an output schema field whose type is outside the renderer's supported set, or piping runtime values of unsupported types into output rendering.
Common situations: Using exotic BAML types (unsupported generics, media/internal types) as class fields for output, or newer type kinds rendered by an older renderer version that predates support.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Enum '{0}' not found
- Class '{0}' not found
- Tuple types are not supported in CFFI
- Arrow types are not supported in CFFI
- `{}` is not a BAML source file. Use a `.baml` file with `--f
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/c93db23595836569.
Report an issue: GitHub.