Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error messages with invalid tokens #146

Open
HaleTom opened this issue May 26, 2021 · 0 comments
Open

Error messages with invalid tokens #146

HaleTom opened this issue May 26, 2021 · 0 comments

Comments

@HaleTom
Copy link

HaleTom commented May 26, 2021

When the token is nil, I see:

** (Mix) Could not start application app: App.Application.start(:normal, []) returned an error: shutdown: failed to start child: App.Telegram
    ** (EXIT) an exception was raised:
        ** (ArgumentError) argument error
            :erlang.bit_size(nil)
            (nadia 0.7.0) lib/nadia/api.ex:9: Nadia.API.build_url/1
            (nadia 0.7.0) lib/nadia/api.ex:118: Nadia.API.request/3
            (app 0.1.1) lib/app/telegram/telegram.ex:46: App.Telegram.init/1
            (stdlib 3.14.1) gen_server.erl:417: :gen_server.init_it/2
            (stdlib 3.14.1) gen_server.erl:385: :gen_server.init_it/6
            (stdlib 3.14.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

When it is an invalid, non-nil, I see:

[error] Telegram bot failed to self-identify{:error, %Nadia.Model.Error{reason: "Not Found"}}
** (Mix) Could not start application app: App.Application.start(:normal, []) returned an error: shutdown: failed to start child: App.Telegram

Could these errors be improved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant