Re: [PATCH 6/6] coverity: detect and report when the token or project is incorrect
- From
Jeff King <peff@peff.net>
- Date
- Sep 25, 2023, 12:17 UTC
- Message-ID
- <20230925121710.GA2118273@coredump.intra.peff.net>
- In-Reply-To
- <f1c818a8-5b18-58f5-ec42-45eb8ad3e00b@gmx.de>
On Mon, Sep 25, 2023 at 01:52:56PM +0200, Johannes Schindelin wrote:
Show 14 quoted lines
> > > Let's detect that scenario and provide a helpful error message instead > > > of trying to go forward with an empty string instead of the correct MD5. > > > > Ah. :) I think using "curl --fail" is probably a simpler solution here. > > Apart from the unintuitive error message. I myself was puzzled and > struggled quite a few times until I realized that it was not the token > that was incorrect, but the project name. > > To help people with a similar mental capacity to my own, I would therefore > really want to keep this here patch. > > As a compromise, I will switch to using `--fail` and then looking at the > exit code (with 22 indicating authentication issues).
Oh, I do not at all mind de-mystifying the error message for the user. I mostly meant that using --fail would be better than scraping the http code from the header file. Though as you note, I guess we have to interpret the exit code in this case anyway, so it is not that much of a simplification.
-Peff