Skip to content

Commit abf1f13

Browse files
committed
Revert "fix: preserve structured McpError data in request history"
This reverts commit 86f6d09.
1 parent 86f6d09 commit abf1f13

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

client/src/lib/hooks/useConnection.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -259,19 +259,9 @@ export function useConnection({
259259

260260
pushHistory(requestWithMetadata, response);
261261
} catch (error) {
262-
if (error instanceof McpError) {
263-
pushHistory(requestWithMetadata, {
264-
error: {
265-
code: error.code,
266-
message: error.rpcMessage ?? error.message,
267-
...(error.data !== undefined && { data: error.data }),
268-
},
269-
});
270-
} else {
271-
const errorMessage =
272-
error instanceof Error ? error.message : String(error);
273-
pushHistory(requestWithMetadata, { error: errorMessage });
274-
}
262+
const errorMessage =
263+
error instanceof Error ? error.message : String(error);
264+
pushHistory(requestWithMetadata, { error: errorMessage });
275265
throw error;
276266
}
277267

0 commit comments

Comments
 (0)