Closed futurist closed 1 day ago
Pingora has its own error types in order to attach metadata, which can help the framework do things like attribute the type or source of an error e.g. whether it was from upstream/downstream.
You may convert from a std Result
and anyhow::Result
using a trait method like err.explain_err(...)
(to replace the error with a pingora type) or err.or_err(...)
(to preserve the original error as the cause when logging, and wrap it in a pingora error). Check out the OrErr
trait and the ErrorType
s.
What is the problem your feature solves, or the need it fulfills?
Use
?
inupstream_peer
:The error is:
Describe the solution you'd like
Implement the trait
From<T>
forpingora_core::Result
Describe alternatives you've considered
Compatible with anyhow::Result?