Merge pull request #879 from geethkokila/master

Fixing the error in event publishing
revert-dabc3590
Geeth 7 years ago committed by GitHub
commit 95f632ae53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -106,9 +106,12 @@ public class EventReceiverServiceImpl implements EventReceiverService {
message.setResponseCode("Event is published successfully."); message.setResponseCode("Event is published successfully.");
return Response.status(Response.Status.CREATED).entity(message).build(); return Response.status(Response.Status.CREATED).entity(message).build();
} else { } else {
log.warn("Error occurred while trying to publish the event. This could be due to unavailability " +
"of the publishing service. Please make sure that analytics server is running and accessible " +
"by this server");
throw new UnexpectedServerErrorException( throw new UnexpectedServerErrorException(
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage("Error occurred while " + new ErrorResponse.ErrorResponseBuilder().setCode(503l).setMessage("Error occurred due to " +
"publishing the event.").build()); "unavailability of the publishing service.").build());
} }
} catch (DataPublisherConfigurationException e) { } catch (DataPublisherConfigurationException e) {
String msg = "Error occurred while getting the Data publisher Service instance."; String msg = "Error occurred while getting the Data publisher Service instance.";

Loading…
Cancel
Save