File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
apps/web/src/features/upload Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -538,14 +538,17 @@ export async function processInstrumentCSV(
538538 for ( const elements of dataLines ) {
539539 const jsonLine : { [ key : string ] : unknown } = { } ;
540540 for ( let j = 0 ; j < headers . length ; j ++ ) {
541- const key = headers [ j ] ! ;
541+ const key = headers [ j ] ! . trim ( ) ;
542542 const rawValue = elements [ j ] ! . trim ( ) ;
543543
544544 if ( rawValue === '\n' ) {
545545 continue ;
546546 }
547547 if ( shape [ key ] === undefined ) {
548- return resolve ( { message : `Schema at '${ key } ' is not defined!` , success : false } ) ;
548+ return resolve ( {
549+ message : `Schema value at column ${ j } is not defined! Please check if Column has been edited/deleted from original template` ,
550+ success : false
551+ } ) ;
549552 }
550553 const typeNameResult = getZodTypeName ( shape [ key ] ) ;
551554 if ( ! typeNameResult . success ) {
You can’t perform that action at this time.
0 commit comments