diff --git a/src/adapter/chrome.ts b/src/adapter/chrome.ts index ebfe409..600f636 100644 --- a/src/adapter/chrome.ts +++ b/src/adapter/chrome.ts @@ -67,14 +67,16 @@ export const createChromeHandler = ( sendResponse({ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - error: getErrorShape({ - config: router._def._config, - error, - type: method, - path: params.path, - input: params.input, - ctx, - }), + error: transformer.output.serialize( + getErrorShape({ + config: router._def._config, + error, + type: method, + path: params.path, + input: params.input, + ctx, + }), + ), }); }; diff --git a/src/adapter/window.ts b/src/adapter/window.ts index 7d7c2c3..b8a82db 100644 --- a/src/adapter/window.ts +++ b/src/adapter/window.ts @@ -73,14 +73,16 @@ export const createWindowHandler = ( sendResponse({ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - error: getErrorShape({ - config: router._def._config, - error, - type: method, - path: params.path, - input: params.input, - ctx, - }), + error: transformer.output.serialize( + getErrorShape({ + config: router._def._config, + error, + type: method, + path: params.path, + input: params.input, + ctx, + }), + ), }); };