mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 14:19:24 +00:00
Update frontend/src/utils/toolErrorHandler.ts
Co-authored-by: James Brunton <jbrunton96@gmail.com>
This commit is contained in:
parent
2ef9de8aa3
commit
af6ef53aed
@ -36,8 +36,7 @@ const extractFromJsonData = (data: unknown): string | null => {
|
|||||||
/**
|
/**
|
||||||
* Default error extractor that follows the standard pattern
|
* Default error extractor that follows the standard pattern
|
||||||
*/
|
*/
|
||||||
export const extractErrorMessage = (error: unknown): string => {
|
export const extractErrorMessage = (error: ToolError): string => {
|
||||||
const typedError = error as ToolError;
|
|
||||||
|
|
||||||
// Try response.data first
|
// Try response.data first
|
||||||
if (typedError.response?.data) {
|
if (typedError.response?.data) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user