Error doesn't hep in identifying the issue with cli-wallet command

  1. Tried running the following command

import_key "prandnum-1" 5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre

Which failed with the error

0 exception: unspecified
tmp wallet file cannot be validated wallet.json.tmp
    {"fn":"wallet.json.tmp"}
    th_a  wallet.cpp:1135 save_wallet_file

The problem was the password was not provided in the quotes, but the error is not at all helpful :). Can we do something about it? at least provide a simple error like " is invalid"?

For more details see below

unlocked >>> import_key "prandnum-1" 5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre
import_key "prandnum-1" 5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre
2077592ms th_a       wallet.cpp:1146               save_wallet_file     ] wallet file content is: {
  "chain_id": "b3f7fe1e5ad0d2deca40a626a4404524f78e65c3a48137551c33ea4e7c365672",
  "my_accounts": [{
      "id": "1.2.2341",
      "membership_expiration_date": "2106-02-07T06:28:15",
      "registrar": "1.2.2341",
      "referrer": "1.2.2341",
      "lifetime_referrer": "1.2.2341",
      "network_fee_percentage": 10000,
      "lifetime_referrer_fee_percentage": 0,
      "referrer_rewards_percentage": 0,
      "name": "prandnum-1",
      "owner": {
        "weight_threshold": 1,
        "account_auths": [],
        "key_auths": [[
            "TEST6bYABXPd8XqFnLkoKnTcL8qHhiZGh3TQbZBy78NZDda5eR4GAs",
            1
          ]
        ],
        "address_auths": []
      },
      "active": {
        "weight_threshold": 1,
        "account_auths": [],
        "key_auths": [[
            "TEST5dYgj8oYFrev9ZkE6N23wkjXowcrp4AdcSbDS6EVMGvNqXVX9R",
            1
          ]
        ],
        "address_auths": []
      },
      "options": {
        "memo_key": "TEST81DtFJVao3TjPHGPBPCthxUvHjXaEgACLVn48ZbFTcvefSFyG2",
        "voting_account": "1.2.5",
        "num_witness": 2,
        "num_committee": 2,
        "votes": [
          "0:14",
          "1:26",
          "0:31",
          "1:38"
        ],
        "extensions": []
      },
      "statistics": "2.6.2341",
      "whitelisting_accounts": [],
      "blacklisting_accounts": [],
      "whitelisted_accounts": [],
      "blacklisted_accounts": [],
      "owner_special_authority": [
        0,{}
      ],
      "active_special_authority": [
        0,{}
      ],
      "top_n_control_flags": 0
    }
  ],
  "cipher_keys": "ef8a5b14314c25b0d419bcd53d47a7dea1d48668d09bb215308d22bd1466183e9a61a444c0b29aad28ec0b5bd71b4e420217bd16e6603433109f2a26e109f9180777576547f13332fd9e214d769aaf0d9b976626216696fe330370d8bae90928bc58187db85e4db2e0900a8815f0cd75bf4095c84ccfe3759e0e39ac8280a39d93b03cc9b4e0286789fd672e4c119ee2123611559238355c1614f8426e85880f",
  "extra_keys": [[
      "1.2.2341",[
        "TEST6bYABXPd8XqFnLkoKnTcL8qHhiZGh3TQbZBy78NZDda5eR4GAs"
      ]
    ]
  ],
  "pending_account_registrations": [],
  "pending_witness_registrations": [],
  "labeled_keys": [],
  "blind_receipts": [],
  "committed_game_moves": [],
  "ws_server": "ws://localhost:8090",
  "ws_user": "",
  "ws_password": ""
}
0 exception: unspecified
tmp wallet file cannot be validated wallet.json.tmp
    {"fn":"wallet.json.tmp"}
    th_a  wallet.cpp:1135 save_wallet_file
unlocked >>>
unlocked >>> import_key "prandnum-1" "5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre"
import_key "prandnum-1" "5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre"
710427ms th_a       wallet.cpp:633                copy_wallet_file     ] backing up wallet wallet.json to after-import-key-1f6d7da0.wallet
true
unlocked >>> import_key prandnum-1 "5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre"
import_key prandnum-1 "5JN2f6MYJ7A9xfcYPMdDXcbRD6Yn2Uij3afDH8MoqFA34xkHsre"
747946ms th_a       wallet.cpp:633                copy_wallet_file     ] backing up wallet wallet.json to before-import-key-1f6d7da0.wallet
747950ms th_a       wallet.cpp:633                copy_wallet_file     ] backing up wallet wallet.json to after-import-key-1f6d7da0-1.wallet
true
unlocked >>>