We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86f6d09 commit abf1f13Copy full SHA for abf1f13
1 file changed
client/src/lib/hooks/useConnection.ts
@@ -259,19 +259,9 @@ export function useConnection({
259
260
pushHistory(requestWithMetadata, response);
261
} 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
- }
+ const errorMessage =
+ error instanceof Error ? error.message : String(error);
+ pushHistory(requestWithMetadata, { error: errorMessage });
275
throw error;
276
}
277
0 commit comments