mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-26 17:52:59 +02:00
linter
This commit is contained in:
parent
c9ac919c55
commit
3c328ede0a
@ -50,11 +50,6 @@ function extractAxiosErrorMessage(error: any): { title: string; body: string } {
|
||||
if (typeof raw === 'string') return raw;
|
||||
try { return JSON.stringify(data); } catch { return ''; }
|
||||
})();
|
||||
// Specific friendly mapping for encrypted PDFs (centralized toast also fires in interceptor)
|
||||
if (ENCRYPTION_ERROR_REGEX.test(body)) {
|
||||
const title = titleForStatus(error.response?.status);
|
||||
return { title, body: ENCRYPTION_FRIENDLY };
|
||||
}
|
||||
const ids = extractIds();
|
||||
const title = titleForStatus(status);
|
||||
if (ids && ids.length > 0) {
|
||||
@ -70,9 +65,6 @@ function extractAxiosErrorMessage(error: any): { title: string; body: string } {
|
||||
}
|
||||
try {
|
||||
const msg = (error?.message || String(error)) as string;
|
||||
if (ENCRYPTION_ERROR_REGEX.test(msg)) {
|
||||
return { title: 'Request error', body: ENCRYPTION_FRIENDLY };
|
||||
}
|
||||
return { title: 'Network error', body: isUnhelpfulMessage(msg) ? FRIENDLY_FALLBACK : msg };
|
||||
} catch (e) {
|
||||
// ignore extraction errors
|
||||
|
Loading…
Reference in New Issue
Block a user