File tree Expand file tree Collapse file tree
apps/web/src/features/upload Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ import { z } from 'zod';
99
1010// TODO - refine ZodTypeNameResult to reflect specific ZodType variants (i.e., object)
1111
12- // TODO - last thing, convert all errors thrown to result to be handled in the UploadPage component
13-
1412const ZOD_TYPE_NAMES = [
1513 'ZodNumber' ,
1614 'ZodString' ,
@@ -554,10 +552,11 @@ export async function processInstrumentCSV(
554552 typeNameResult . multiValues ,
555553 typeNameResult . multiKeys
556554 ) ;
555+ // TODO - what if this is not the case? Once generics are handled correctly should not be a problem
556+ //Dealt with via else statement for now
557557 } else {
558558 interpreterResult . message = 'Record Array keys do not exist' ;
559559 }
560- // TODO - what if this is not the case? Once generics are handled correctly should not be a problem
561560 } else {
562561 interpreterResult = interpretZodValue ( rawValue , typeNameResult . typeName , typeNameResult . isOptional ) ;
563562 }
@@ -568,8 +567,6 @@ export async function processInstrumentCSV(
568567 }
569568 const zodCheck = instrumentSchemaWithInternal . safeParse ( jsonLine ) ;
570569 if ( ! zodCheck . success ) {
571- //create error message with zodcheck error messsage + zodcheck error path
572- //addNotification({ message: zodCheck.error.issues[0]?.message, type: 'error' });
573570 console . error ( zodCheck . error . issues ) ;
574571 const zodIssues = zodCheck . error . issues . map ( ( issue ) => {
575572 return `issue message: \n ${ issue . message } \n path: ${ issue . path . toString ( ) } "` ;
You can’t perform that action at this time.
0 commit comments