Show all attempted locations when a 403 occurs

When a server returns a 403 during dependency lookup, Gradle doesn’t display all the locations it tried like with a 404. Could this be changed?

@daz what do you think?

Gradle treats 403 just like 500 when it comes to resolution failures. I wouldn’t add special case handling for 403, but instead improve the reporting of resolution failures in general. This could include reporting all URLs that were attempted, and the response code received.

Hmmm. Now I’m confused. I just tested this and it looks like we’re giving a pretty good summary of what was attempted when resolution fails:

Execution failed for task ':showBroken'.
> Could not resolve all dependencies for configuration ':broken'.
   > Could not resolve group:projectA:1.2.
     Required by:
         :5g33:unspecified
      > Could not resolve group:projectA:1.2.
         > Could not get resource 'http://localhost:53137/repo1/group/projectA/1.2/projectA-1.2.pom'.
            > Could not GET 'http://localhost:53137/repo1/group/projectA/1.2/projectA-1.2.pom'. Received status code 403 from server: forbidden
      > Could not resolve group:projectA:1.2.
         > Could not get resource 'http://localhost:53137/repo2/group/projectA/1.2/projectA-1.2.pom'.
            > Could not GET 'http://localhost:53137/repo2/group/projectA/1.2/projectA-1.2.pom'. Received status code 403 from server: forbidden

Is this different from what you’re seeing?