mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 14:19:24 +00:00
tweak
This commit is contained in:
parent
6dc8b922f6
commit
1d62f6264a
@ -78,7 +78,8 @@ export const extractErrorMessage = (error: unknown): string => {
|
|||||||
*/
|
*/
|
||||||
export const createStandardErrorHandler = (fallbackMessage: string) => {
|
export const createStandardErrorHandler = (fallbackMessage: string) => {
|
||||||
return (error: unknown): string => {
|
return (error: unknown): string => {
|
||||||
return extractErrorMessage(error) || fallbackMessage;
|
const message = extractErrorMessage(error);
|
||||||
|
return message === 'Operation failed' ? fallbackMessage : message;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user