in_context
in_context¶
- in_context(result: Optional[configpile.userr.Err], **contexts: Any) Optional[configpile.userr.Err] [source]¶
- in_context(result: Res[_Value_co], **contexts: Any) Res[_Value_co]
Adds context to an error contained in a result type (when applicable)
This function has different signatures depending on the argument types.
- Parameters
result (See signatures) – Result to enrich, if it contains an error
contexts (
Any
) – Contexts to add, given as keyword arguments
- Returns
Updated result with added context
- Return type
See signatures
See also