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
parent 2ef9de8aa3
commit af6ef53aed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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) {