click.prompt(type=int, hide_input=True) outputs rejected input

Despite asking click.prompt() to hide input it will still outputs the input if it rejects it. I get the same behavior for 7.0 from PyPI, 7.x from Git, and master from Git.

altendky@p1:~$ venv/bin/python -c 'import click; click.prompt("prompt", type=int, hide_input=True)'
prompt: 
Error: wait...  i get to see this? is not a valid integer
prompt:

If you specify a type (let's say you are inputting a numeric pin) then the same can happen with click.password_option().

import click


@click.command()
@click.password_option(type=int)
def cli(password):
    pass


cli()
altendky@p1:~$ venv/bin/python x.py
Password: 
Error: lkjsaf is not a valid integer
Password:

The workaround for click.prompt() anyways I guess is to not specify a type and to implement the rejection manually.

If there is agreement that this is an issue that should be fixed then I can try to put together a PR for it.