function uneval_action_response(data, route_id, transport) {
	const replacer = (/** @type {any} */ thing) => {
		for (const key in transport) {
			const encoded = transport[key].encode(thing);
			if (encoded) {
				return `app.decode('${key}', ${devalue.uneval(encoded, replacer)})`;
			}
		}
	};

	return try_serialize(data, (value) => devalue.uneval(value, replacer), route_id);
}
Try to `devalue.uneval` the data object, and if it fails, return a proper Error with context
@param {any} data
@param {string} route_id
@param {import('types').ServerHooks['transport']} transport