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

Bug: customErrorMessage actually got passed 4 arguments, but it's ts declaration only has 3 arguments #359

Open
gavinliukaiber opened this issue Nov 25, 2024 · 1 comment

Comments

@gavinliukaiber
Copy link

gavinliukaiber commented Nov 25, 2024

customErrorMessage actually got passed 4 arguments:

errorMessage(req, res, error, responseTime)

, but its ts declaration only has 3 arguments:
customErrorMessage?: ((req: IM, res: SR, error: Error) => string) | undefined;

I'd like to make use of the 4th argument "responseTime" in my logging message.

@mcollina
Copy link
Member

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. We use tsd for testing our types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants