mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 10:11:35 +10:00
chore: throw error if response not ok
This commit is contained in:
@ -31,6 +31,10 @@ export const DocumentAuditLogDownloadButton = ({
|
||||
try {
|
||||
const response = await fetch(`/api/t/${team.url}/download/audit-logs/${documentId}`);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to download certificate');
|
||||
}
|
||||
|
||||
const contentDisposition = response.headers.get('Content-Disposition');
|
||||
const filename =
|
||||
contentDisposition?.split('filename="')[1]?.split('"')[0] ||
|
||||
|
||||
Reference in New Issue
Block a user