[MRM-276] HTTP error 500 when artifact is not found

Submitted By: Antoine Veret



git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@511903 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joakim Erdfelt 2007-02-26 17:06:10 +00:00
parent e84119abed
commit d6ed4a5db5
1 changed files with 6 additions and 2 deletions

View File

@ -37,6 +37,8 @@ import org.codehaus.plexus.webdav.DavServerException;
import org.codehaus.plexus.webdav.servlet.DavServerRequest; import org.codehaus.plexus.webdav.servlet.DavServerRequest;
import org.codehaus.plexus.webdav.util.WebdavMethodUtil; import org.codehaus.plexus.webdav.util.WebdavMethodUtil;
import sun.security.action.GetLongAction;
import javax.servlet.ServletConfig; import javax.servlet.ServletConfig;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -83,7 +85,7 @@ public class ProxiedDavServer
private ArtifactRepository managedRepository; private ArtifactRepository managedRepository;
private List/*<ArtifactRepository>*/ proxiedRepositories; private List/*<ArtifactRepository>*/proxiedRepositories;
private ProxyInfo wagonProxy; private ProxyInfo wagonProxy;
@ -157,7 +159,9 @@ public class ProxiedDavServer
} }
catch ( ResourceDoesNotExistException e ) catch ( ResourceDoesNotExistException e )
{ {
throw new ServletException( "Unable to fetch resource, it does not exist.", e ); // TODO: getLogger().info( "Unable to fetch resource, it does not exist.", e );
// return an HTTP 404 instead of HTTP 500 error.
return;
} }
catch ( ProxyException e ) catch ( ProxyException e )
{ {