Skip to content
Snippets Groups Projects
Commit 6a448b36 authored by gmantele's avatar gmantele
Browse files

[UWS] Fix function call loop when managing an error at the root service level.

parent 1c3bbbd1
No related branches found
No related tags found
No related merge requests found
......@@ -1140,7 +1140,7 @@ public class UWSService implements UWS {
// Apply the redirection:
redirect(error.getMessage(), request, user, uwsAction, response);
}else
sendError(error, request, reqID, user, uwsAction, response);
sendError((Exception)error, request, reqID, user, uwsAction, response);
}
/**
......
......@@ -501,7 +501,7 @@ public abstract class UWSServlet extends HttpServlet implements UWS, UWSFactory
InputStream input = null;
try{
input = getFileManager().getErrorInput(error, job);
UWSToolBox.write(input, "text/plain", getFileManager().getErrorSize(error, job), resp);
UWSToolBox.write(input, errorWriter.getErrorDetailsMIMEType(), getFileManager().getErrorSize(error, job), resp);
}catch(IOException ioe){
getLogger().logUWS(LogLevel.ERROR, error, "GET_ERROR", "Can not read the details of the error summary of the job \"" + job.getJobId() + "\"!", ioe);
throw new UWSException(UWSException.INTERNAL_SERVER_ERROR, ioe, "Can not read the error details (job ID: " + job.getJobId() + ").");
......@@ -649,7 +649,7 @@ public abstract class UWSServlet extends HttpServlet implements UWS, UWSFactory
throw new ServletException("Can not redirect the response! You should notify the administrator of the service (FATAL-" + reqID + "). However, while waiting a correction of this problem, you can manually go toward " + error.getMessage() + ".");
}
}else
sendError(error, request, reqID, user, uwsAction, response);
sendError((Exception)error, request, reqID, user, uwsAction, response);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment