Skip to content

Misleading error: "Invalid GitHub token" whenever query fails #495

@wrsturgeon

Description

@wrsturgeon

Initially, I had the same problem as this closed issue. I left a few comments there before I realized it was closed, so let me summarize here:

It seems like XtensaRust::get_latest_version() is failing. However, this line seems to delete errors received from XtensaRust::get_latest_version() and return Error::GithubTokenInvalid instead (a bit misleading, since GithubTokenInvalid is also returned later in the file for an explicit authorization error). Because the original errors are suppressed, it's difficult for me to give you exactly what's going wrong, but I believe I've tracked it down to the function github_query by observing which log::debug! statements are printed before the program exits.

So, I guess this error is two-fold:

  1. Is there a way to uncover the real error and work around it?
  2. Is it possible to provide a more informative error message on the above line? I'd be willing to help out as well.

Thanks for anything that might help!

Best,
Will

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions