← Graph

Does Literal::Data raise in production on a bad prop?

question 2 connections

Audience question: does Literal::Data raise when given the wrong type, and does that behavior apply in production? Drapper confirms yes — it raises. He originally built a toggle to disable type checking in production for performance, but found overhead unnoticeable in practice. Leaving checks on is deliberately preferable: raising with a precise error message is better than silently corrupting data. At Clear Scope, production error rates went *down* after enabling it.

answer_summary
Yes, Literal raises in production. Performance overhead is unnoticeable; Clear Scope saw fewer prod errors after enabling it.
question Does Literal::Data raise in production on a bad prop?
about
Literal tool
Asks about Literal::Data production behavior.
question Does Literal::Data raise in production on a bad prop?
asked_at
Second audience Q&A question.

Provenance