Skip to content

Error messages with invalid tokens #146

@HaleTom

Description

@HaleTom

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions