0xPolygonMiden / miden-node

Reference implementation of the node for the Polygon Miden rollup
MIT License
53 stars 37 forks source link

[Task]: Correctly emit traces on faucet #499

Open igamigo opened 2 months ago

igamigo commented 2 months ago

Node's components affected by this task

Faucet

What should be done?

On the faucet, when any error occurs on the server's actions, it is not logged correctly to the console. Instead, errors are bubbled up as Result<_,_>, and absorbed in the top level. Instead, it should be logged as an error trace.

How should it be done?

On the endpoint functions, make sure that if any error is returned, it is logged and shown pertinently.

When is this task done?

When, for example, we can see internal server errors on the console.

Additional context

https://github.com/0xPolygonMiden/miden-node/pull/498#discussion_r1764050281

Mirko-von-Leipzig commented 1 month ago

This has likely been fixed in the migration from actix to axum in #479.

It now uses tower's http-trace which has sensible defaults and I presume logs failures.

I would keep this issue open as we may want to improve the traces further by customizing them.

The axum tracing example shows some things we may want to include, like the rejection of extractors (we use the Json<T> extractor for example).