nok
Returns a dictionary containing an error key mapped to the provided value.
def nok(
value: any
) - > dict
Wraps a provided error message or value into a standardized error dictionary.
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | The error message, exception details, or status code to be encapsulated. |
Returns
| Type | Description |
|---|---|
dict | A dictionary containing a single 'error' key mapped to the provided value. |