瀏覽代碼

fix(api-gateway): stringify error in service proxy

Karol Sójko 1 年之前
父節點
當前提交
e385926046
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/api-gateway/src/Service/Http/HttpServiceProxy.ts

+ 3 - 1
packages/api-gateway/src/Service/Http/HttpServiceProxy.ts

@@ -218,7 +218,9 @@ export class HttpServiceProxy implements ServiceProxyInterface {
         : (error as Error).message
 
       this.logger.error(
-        `Could not pass the request to ${serverUrl}/${endpointOrMethodIdentifier} on underlying service: ${errorMessage}`,
+        `Could not pass the request to ${serverUrl}/${endpointOrMethodIdentifier} on underlying service: ${JSON.stringify(
+          error,
+        )}`,
       )
 
       this.logger.debug('Response error: %O', (error as AxiosError).response ?? error)