1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-11 14:20:05 +00:00

chore: fix specs for getFormData and convertToCsv

This commit is contained in:
2025-03-03 00:19:50 +05:00
parent 3713a226a4
commit 7bdd826418
2 changed files with 7 additions and 3 deletions

View File

@@ -10,10 +10,14 @@ export const convertToCSV = (
tableName: string
) => {
if (!data[tableName]) {
throw prefixMessage(
const error = prefixMessage(
'No table provided to be converted to CSV.',
'Error while converting to CSV. '
)
if (typeof error === 'string') throw new Error(error)
throw error
}
const table = data[tableName]