Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
lexevs committed Apr 27, 2021
1 parent 885c6c1 commit 712e451
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package gov.nih.nci.cananolab.restful;

import javax.json.Json;
import javax.json.JsonBuilderFactory;
import javax.json.JsonObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.DefaultValue;
Expand Down Expand Up @@ -40,7 +43,13 @@ public Response view(@Context HttpServletRequest httpRequest, @DefaultValue("")
return Response.ok(view).build();

} catch (Exception e) {
return Response.ok("Error while viewing the composition results" +e).build();
JsonBuilderFactory factory = Json.createBuilderFactory(null);
JsonObject value = factory.createObjectBuilder()
.add("status", "Error while viewing the composition results").build();

return
Response.ok(value).build();
// return Response.ok("Error while viewing the composition results" +e).build();
}
}

Expand All @@ -62,7 +71,13 @@ public Response summaryPrint(@Context HttpServletRequest httpRequest,

return Response.ok(view).build();
} catch (Exception e) {
return Response.ok("Error while printing the file").build();
JsonBuilderFactory factory = Json.createBuilderFactory(null);
JsonObject value = factory.createObjectBuilder()
.add("status", "Error while printing the file").build();

return
Response.ok(value).build();
// return Response.ok("Error while printing the file").build();
}
}

Expand All @@ -82,6 +97,7 @@ public Response summaryExport(@Context HttpServletRequest httpRequest, @Context

return Response.ok("").build();
} catch (Exception e) {
//TODO - Test the front end. Does the Angular accept this?
return Response.ok("Error while exporting the file").build();
}
}
Expand Down
2 changes: 1 addition & 1 deletion software/cananolab-webapp/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
</div>
</div>
<br>
<div class="footerVersion">caNanoLab Release 2.3.11 Build cananolab-2.3.11-it17</div><br /><br />
<div class="footerVersion">caNanoLab Release 2.3.11 Build cananolab-2.3.11-it18</div><br /><br />
<!-- footer ends -->
</td>
</tr>
Expand Down

0 comments on commit 712e451

Please sign in to comment.