show error message when API token can't be generated #1183