#310 Show hint when Pagure token expires
Merged by onosek. Opened by onosek.
onosek/fedpkg hint_pagure_token_expires  into  master

Download 310.patch

Command fedpkg request-repo --help already contains this information, so adding hint (to execute this command) when this happens.

Fixes: #285

Signed-off-by: Ondrej Nosek onosek@redhat.com

Would this be too general catch the expected error message? In test, a possible response error message contains content "Invalid or expired token", if Pagure.io actually responses this content when a token is invalid or expired, it would be good just to match this content as much as possible, in case '\btoken\b' matches any other potential unrelated messages that just contains a word "token".

rebased onto a66bbafa4c7a2738fa45f8f64c22813d25d10d57

Thanks for the comment. Actually, it was my original purpose - to catch all error messages related to tokens.
Of course, there could be other different messages, that refer to different errors than invalid or expired token (missing token is covered elsewhere), but the Pagure message is still shown, and as a hint, there is added one sentence with context "For invalid or expired token refer to ...".
OK, I did the search pattern more specific as per your comment, but there is danger in case that Pagure will change the error wording, the hint will silently disappear. And that is, in my opinion, better than showing this hint when it is not 100% relevant.

I agree with not showing the message unless we are sure it is relevant. Misleading errors confuse people a lot.

Looks good to me.

Pull-Request has been merged by onosek

Metadata