Update frontend/src/utils/toolErrorHandler.ts

Co-authored-by: James Brunton <jbrunton96@gmail.com>
This commit is contained in:
Reece Browne
2025-08-15 12:24:36 +01:00
committed by GitHub
co-authored by James Brunton
parent 2ef9de8aa3
commit af6ef53aed
+1 -2
View File
@@ -36,8 +36,7 @@ const extractFromJsonData = (data: unknown): string | null => {
/**
* Default error extractor that follows the standard pattern
*/
export const extractErrorMessage = (error: unknown): string => {
const typedError = error as ToolError;
export const extractErrorMessage = (error: ToolError): string => {
// Try response.data first
if (typedError.response?.data) {