I have an app that looks like this:
.get("/*", ({ params, set }) => {
if (Math.random() > 0.9) {
set.status = 403;
return "You have exceeded a secondary rate limit";
}
return { items: [] };
})
And when you hit it repeatedly, all the logging says is
...
GET /any/thing | 22µs
GET /any/thing | 21µs
GET /any/thing | 21µs
GET /any/thing | 22µs
GET /any/thing | 21µs
GET /any/thing | 21µs
GET /any/thing | 22µs
GET /any/thing | 22µs
GET /any/thing | 25µs
...
I guess, by default the logging string is about the request | about the response
and in the about the response
, the only thing is displays is the time it took (e.g. 21µs
).
Could the default mention non-200 exit codes too?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too