Browse Source

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

Karol Sójko 1 year ago
parent
commit
e385926046
1 changed files with 3 additions and 1 deletions
  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
         : (error as Error).message
 
 
       this.logger.error(
       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)
       this.logger.debug('Response error: %O', (error as AxiosError).response ?? error)