Explorar o código

Fix error I observed in logs

> TypeError: Cannot read properties of undefined (reading 'method')
Manav Rathi hai 1 ano
pai
achega
c2edac6192
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      web/packages/shared/network/HTTPService.ts

+ 2 - 2
web/packages/shared/network/HTTPService.ts

@@ -28,8 +28,8 @@ class HTTPService {
                         const responseData = response.data;
                         log.error(
                             `HTTP Service Error - ${JSON.stringify({
-                                url: config.url,
-                                method: config.method,
+                                url: config?.url,
+                                method: config?.method,
                                 xRequestId: response.headers["x-request-id"],
                                 httpStatus: response.status,
                                 errMessage: responseData.message,