Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddRequestContext misses name property #261

Closed
a-margaritis opened this issue Aug 4, 2021 · 1 comment
Closed

AddRequestContext misses name property #261

a-margaritis opened this issue Aug 4, 2021 · 1 comment
Assignees
Labels
bug Something isn't working logging

Comments

@a-margaritis
Copy link

It was noticed while checking the logs of an app which was build based on orka that during init phase one of the middlewares was not reported. From the orka-builder#217 we can see that name property is used to report middleware component but from the following log

{"timestamp":"2021-08-04T07:27:22.834Z","severity":"INFO","categoryName":"initializing.orka","message":"Using 8 middleware: [addRequestId, , bodyParser, riviere, errorHandler, koaCompress, cors, fastKoaRouter]...","context":{}}

that the AddRequestContext middleware misses that property.

https://github.com/Workable/orka/blob/master/src/initializers/koa/add-request-context.ts

@nikostoulas
Copy link
Contributor

Yeap the function needs to be changed from

return async (ctx: Context, next: () => Promise<void>) => {
return async function AddRequestContext (ctx: Context, next: () => Promise<void>)  {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logging
Projects
None yet
Development

No branches or pull requests

4 participants