in src/client/src/schema/validation/validate_schema.ts [36:46]
function readableContext(context: Context) {
// The information provided, the last context is good enough.
// Otherwise, repeating the values for every nested key is too noisy.
const last = context[context.length - 1];
return JSON.stringify({
expected: last.type.name,
// Explicitly printing `undefined` to make it more obvious in the message
actual: typeof last.actual,
value: last.actual === undefined ? 'undefined' : last.actual,
});
}