refactor: error handling (#31455)

This commit is contained in:
Jason Rasmussen authored and GitHub committed 2026-09-11 14:11:06 -04:00
1 parent 2152191c24
commit f346fe1f94
7 files changed
+43 -38

No files matched your search

@@ -83,9 +83,11 @@ export class IntegrityAdminController {
@FileResponse()
@Authenticated({ permission: Permission.Maintenance, admin: true })
getIntegrityReportCsv(@Param() { type }: IntegrityReportTypeParamDto, @Res() res: Response): void {
res.setHeader('Content-Type', 'text/csv');
res.setHeader('Cache-Control', 'private, no-cache, no-transform');
res.setHeader('Content-Disposition', `attachment; filename="${encodeURIComponent(`${Date.now()}-${type}.csv`)}"`);
res.header({
'Content-Type': 'text/csv',
'Cache-Control': 'private, no-cache, no-transform',
'Content-Disposition': `attachment; filename="${encodeURIComponent(`${Date.now()}-${type}.csv`)}"`,
});
this.service.getIntegrityReportCsv(type).pipe(res);
}