File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/instrument-interpreter/src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,9 @@ export class InstrumentInterpreter {
2828 options ?: InterpretOptions < TKind >
2929 ) : Promise < SomeInstrument < TKind > > {
3030 let instrument : AnyInstrument ;
31+ let value : unknown ;
3132 try {
32- const value : unknown = await evaluateInstrument ( bundle ) ;
33+ value = await evaluateInstrument ( bundle ) ;
3334 if ( ! options ?. validate ) {
3435 instrument = value as SomeInstrument < TKind > ;
3536 } else if ( options . kind === 'FORM' ) {
@@ -44,6 +45,12 @@ export class InstrumentInterpreter {
4445 throw new Error ( `Unexpected kind: ${ options . kind } ` ) ;
4546 }
4647 } catch ( error ) {
48+ if ( value ) {
49+ console . error ( {
50+ message : 'Validation Error' ,
51+ value
52+ } ) ;
53+ }
4754 throw new Error ( `Failed to evaluate instrument bundle` , { cause : error } ) ;
4855 }
4956 instrument . id = options ?. id ;
You can’t perform that action at this time.
0 commit comments