@emeryld/rrroutes-client 2.3.7 → 2.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -348,8 +348,14 @@ function createRouteClient(opts) {
348
348
  } : void 0
349
349
  )
350
350
  );
351
- const parsed = validateResponses && leafCfg.outputSchema ? (0, import_rrroutes_contract.lowProfileParse)(leafCfg.outputSchema, out) : void 0;
351
+ let parsed = out;
352
352
  if (validateResponses) {
353
+ if (!leafCfg.outputSchema) {
354
+ throw new Error(
355
+ `No output schema defined for leaf ${leafLabel}, cannot validate response.`
356
+ );
357
+ }
358
+ parsed = (0, import_rrroutes_contract.lowProfileParse)(leafCfg.outputSchema, out);
353
359
  emit(
354
360
  decorateDebugEvent(
355
361
  {