Skip to content

Commit 99b32ad

Browse files
authored
Merge pull request #1141 from rocket-admin/backend_saved_filters
feat: add additional temporary debug logging to CSV export failures
2 parents 3de3d0f + 8caa81a commit 99b32ad

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

backend/src/entities/table/use-cases/export-csv-from-table.use.case.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import * as csv from 'csv';
1515
import { isObjectEmpty } from '../../../helpers/is-object-empty.js';
1616
import { FilteringFieldsDs } from '../table-datastructures.js';
1717
import { NonAvailableInFreePlanException } from '../../../exceptions/custom-exceptions/non-available-in-free-plan-exception.js';
18+
import { slackPostMessage } from '../../../helpers/index.js';
1819

1920
@Injectable()
2021
export class ExportCSVFromTableUseCase
@@ -115,9 +116,17 @@ export class ExportCSVFromTableUseCase
115116
if (error instanceof HttpException) {
116117
throw error;
117118
}
119+
// todo: temporary debug log
120+
await slackPostMessage(`
121+
CSV Export Failed with error: ${error.message}\n
122+
Connection type: ${connection.type}\n
123+
SSH Option: ${connection.ssh}\n
124+
SSL Option: ${connection.ssl}\n
125+
`);
118126
throw new HttpException(
119127
{
120128
message: Messages.CSV_EXPORT_FAILED,
129+
originalMessage: error.message,
121130
},
122131
HttpStatus.INTERNAL_SERVER_ERROR,
123132
);

0 commit comments

Comments
 (0)