jkyberneees / fastify-gateway

A Node.js API gateway that just works!
https://www.npmjs.com/package/k-fastify-gateway
MIT License
108 stars 14 forks source link

Error on fastify 4.13.0 #68

Open andidans opened 1 year ago

andidans commented 1 year ago

log error

{"level":30,"time":1685823837047,"pid":41165,"hostname":"Andis-MacBook-Pro.local","reqId":"req-1","req":{"method":"GET","url":"/health/time","hostname":"localhost:3001","remoteAddress":"::1","remotePort":53825},"msg":"incoming request"} {"level":50,"time":1685823837048,"pid":41165,"hostname":"Andis-MacBook-Pro.local","reqId":"req-1","req":{"method":"GET","url":"/health/time","hostname":"localhost:3001","remoteAddress":"::1","remotePort":53825},"res":{"statusCode":500},"err":{"type":"TypeError","message":"Cannot read properties of undefined (reading 'url')","stack":"TypeError: Cannot read properties of undefined (reading 'url')\n at Object. (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/k-fastify-gateway/index.js:6:35)\n at preHandlerCallback (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/lib/handleRequest.js:128:37)\n at preValidationCallback (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/lib/handleRequest.js:112:5)\n at handler (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/lib/handleRequest.js:76:7)\n at handleRequest (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/lib/handleRequest.js:24:5)\n at runPreParsing (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/lib/route.js:537:5)\n at Object.routeHandler [as handler] (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/lib/route.js:484:7)\n at Router.callHandler (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/find-my-way/index.js:398:14)\n at Router.lookup (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/find-my-way/index.js:376:17)\n at Server.preRouting (/Users/andi-dans/Dans/Labs/nx-fastify-microservice-base/node_modules/fastify/fastify.js:792:14)"},"msg":"Cannot read properties of undefined (reading 'url')"} {"level":30,"time":1685823837056,"pid":41165,"hostname":"Andis-MacBook-Pro.local","reqId":"req-1","res":{"statusCode":500},"responseTime":8.463874999433756,"msg":"request completed"}