You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ErrorOr is often used in circumstances where exceptions might be thrown (for example, during I/O calls) which are then translated to an Error instance. While its technically possible to store the exception in the Error.Metadata dictionary, I wanted to ask if it would be useful to have a dedicated Exception property on the Error struct? Of course, this value of this property could be null.
When I work with other developers, they often forget to pass an exception on to the caller. These callers are responsible for logging as it has more context - the exception and especially its stack trace will never show up in any log.
We could also introduce a static FromException() where the we can provide customizable retrieval of error codes, descriptions, error types and metadata for popular exception types.
The text was updated successfully, but these errors were encountered:
ErrorOr is often used in circumstances where exceptions might be thrown (for example, during I/O calls) which are then translated to an
Error
instance. While its technically possible to store the exception in theError.Metadata
dictionary, I wanted to ask if it would be useful to have a dedicatedException
property on theError
struct? Of course, this value of this property could be null.When I work with other developers, they often forget to pass an exception on to the caller. These callers are responsible for logging as it has more context - the exception and especially its stack trace will never show up in any log.
We could also introduce a static
FromException()
where the we can provide customizable retrieval of error codes, descriptions, error types and metadata for popular exception types.The text was updated successfully, but these errors were encountered: