Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Changed level of logging for the message when trying to fetch REST AP…
Browse files Browse the repository at this point in the history
…I and server is still initiating.
  • Loading branch information
rubenvp8510 authored and spinder committed Sep 6, 2017
1 parent 81f532b commit ef54f17
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ public Object setCaller(InvocationContext ctx) throws Exception {
Subject caller=null;
java.security.Principal p = ejbContext.getCallerPrincipal();
if (!startupBean.isInitialized()) {
String notInitMessage = "Tried to call REST endpoint but the server has not finished to startup";
log.warn(notInitMessage);
Response.ResponseBuilder builder;
builder = Response.status(Response.Status.SERVICE_UNAVAILABLE).entity(notInitMessage);
return builder.build();
String notInitMessage = "Tried to call REST endpoint but the server is not ready - still booting up";
log.debug(notInitMessage);
return Response.status(Response.Status.SERVICE_UNAVAILABLE)
.header("Retry-After", "30").entity(notInitMessage).build();
}

if (p!=null) {
Expand Down

0 comments on commit ef54f17

Please sign in to comment.