• Creates a standardized failure response

    Parameters

    • error: string

      Error message describing the failure

    Returns FailureResponse

    FailureResponse object with null data and the error message

    const result = failure('User not found');
    // Result: { data: null, error: 'User not found' }