fixed bug
This commit is contained in:
parent
bffac60eb1
commit
6066406a08
|
@ -179,7 +179,7 @@ public class Comments {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@StatusCodes ({
|
||||
@ResponseCode ( code = 201, condition = "Successfull created, the new post is reported in the 'result' field of the returned object"),
|
||||
@ResponseCode ( code = 201, condition = "Successfull created, the new comment is reported in the 'result' field of the returned object"),
|
||||
@ResponseCode ( code = 500, condition = ErrorMessages.ERROR_IN_API_RESULT)
|
||||
})
|
||||
public Response writeComment(
|
||||
|
@ -235,7 +235,9 @@ public class Comments {
|
|||
|
||||
try {
|
||||
result = CassandraConnection.getInstance().getDatabookStore().addComment(theComment);
|
||||
logger.debug("Added comment? " + comment.toString() + " Result is " +result);
|
||||
} catch(Exception e){
|
||||
e.printStackTrace();
|
||||
responseBean.setMessage("Could not reach the DB to write the comment, something went wrong");
|
||||
responseBean.setSuccess(false);
|
||||
status = Status.INTERNAL_SERVER_ERROR;
|
||||
|
|
Loading…
Reference in New Issue