Skip to content

Commit

Permalink
style: extra clarity in parsing error message
Browse files Browse the repository at this point in the history
  • Loading branch information
zaki-amin committed Nov 8, 2024
1 parent 21948c7 commit 0961a86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/csv/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const processCsvUpload = async (
}
const objects = preprocessingResult.data

let errorMessageOrPromises
let errorMessageOrPromises: FormPassbackState | Promise<unknown>[]
switch (dataUploadType) {
case DataUploadEnum.APPLICATION:
errorMessageOrPromises = handleParsing(objects, csvApplicationSchema, upsertApplication)
Expand Down
2 changes: 1 addition & 1 deletion lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function parseWithSchema<T extends ZodSchema>(
if (!parsed.success) {
console.error(parsed.error.errors)
return {
errorMessage: `Parsing error on row ${i + 1}: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`
errorMessage: `Parsing error on data row ${i + 1}: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`
}
}
}
Expand Down

0 comments on commit 0961a86

Please sign in to comment.