This commit is contained in:
Francesco Mangiacrapa 2024-04-19 17:30:08 +02:00
parent 8579d6030d
commit 7ee615cedf
2 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,7 @@ public class HTML_Page {
+ " }\n"
+ " async function playPDFPoll() {\n"
+ " const pdf_json = await fetchPDF_URL();\n"
+ " console.log(\"response \"+pdf_json);\n"
+ " if (!(pdf_json.url === null || pdf_json.url === undefined)) {\n"
+ " window.location.replace(pdf_json.url);\n"
+ " } else {\n"

View File

@ -221,6 +221,7 @@ public class GeoportalExporter {
LOG.info("FileReference at code {} is {}", pdfCode, fetchedPDF);
if (fetchedPDF == null) {
LOG.info("returning not found");
return Response.status(Status.NOT_FOUND).entity(HTML_Page.getErrorPage("Job not created", "No job found with id "+pdfCode))
.type(MediaType.TEXT_HTML).build();
}