mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-03-04 02:20:19 +01:00
tweak
This commit is contained in:
@@ -78,7 +78,8 @@ export const extractErrorMessage = (error: unknown): string => {
|
||||
*/
|
||||
export const createStandardErrorHandler = (fallbackMessage: string) => {
|
||||
return (error: unknown): string => {
|
||||
return extractErrorMessage(error) || fallbackMessage;
|
||||
const message = extractErrorMessage(error);
|
||||
return message === 'Operation failed' ? fallbackMessage : message;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user