const [error, value] = err("not_found"); // error is { label: "not_found", source: Error("not_found") } // value is null
Example
const [error, value] = err("not_found", newError("Resource not found")); // error is { label: "not_found", source: Error("Resource not found") } // value is null
Creates a ResultErr. It can be called with a label and source, or with an existing Err object.