Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-9502

NuGet proxy repository responds with 502 status instead of 404 for missing content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-m7, 3.0.0, 3.1.0
    • Fix Version/s: 3.0.1
    • Component/s: NuGet
    • Labels:
      None
    • Environment:
      IE11 Windows7
    • Story Points:
      0.5
    • Sprint:
      Sprint 69

      Description

      Noticed this when I typed in the wrong version populating content into a nuget repo for testing. The code explicitly throws an IOException when remote content isn't found. I would (perhaps naively) expect that this would just result in a 404. Truncated exception from log shown below:

      2015-12-03 10:10:29,465-0800 WARN  [qtp54656185-342] admin com.sonatype.nexus.repository.nuget.internal.proxy.NugetFeedFetcher - Status code 404 contacting https://www.nuget.org/api/v2/Packages(Id='jQuery',Version='7.0.4')
      2015-12-03 10:10:29,467-0800 WARN  [qtp54656185-342] admin com.sonatype.nexus.repository.nuget.internal.proxy.NugetProxyFacet - Failed to fetch: jQuery/7.0.4
      java.io.IOException: Package content not found in remote repository
      	at com.sonatype.nexus.repository.nuget.internal.proxy.NugetProxyFacet.fetch(NugetProxyFacet.java:72) [na:na]
      	at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:169) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:48) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:41) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:45) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Context.start(Context.java:102) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:58) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43) [org.sonatype.nexus.repository:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:198) [org.sonatype.nexus.plugins.nexus-repository-httpbridge:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:160) [org.sonatype.nexus.plugins.nexus-repository-httpbridge:3.0.0.SNAPSHOT]
      	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:117) [org.sonatype.nexus.plugins.nexus-repository-httpbridge:3.0.0.SNAPSHOT]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api:3.1.0]
       

      This was triggered with a request against the api for a version that does not exist: http://localhost:8081/repository/nuget.org-proxy/jQuery/7.1.4

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                krobinson Kelly Robinson
                Last Updated By:
                Kelly Robinson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: