mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Modify CommentManagementAPIImpl
returned Error Response.
This commit is contained in:
parent
06059cacf1
commit
453559a07b
@ -63,6 +63,7 @@ public class CommentManagementAPIImpl implements CommentManagementAPI{
|
|||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error("SQL Exception occurs", e);
|
log.error("SQL Exception occurs", e);
|
||||||
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
}
|
}
|
||||||
return Response.status(Response.Status.OK).entity(comments).build();
|
return Response.status(Response.Status.OK).entity(comments).build();
|
||||||
}
|
}
|
||||||
@ -121,11 +122,11 @@ public class CommentManagementAPIImpl implements CommentManagementAPI{
|
|||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error("SQL Exception occurs", e);
|
log.error("SQL Exception occurs", e);
|
||||||
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
}catch (DBConnectionException e) {
|
}catch (DBConnectionException e) {
|
||||||
log.error("DB Connection Exception occurs", e);
|
log.error("DB Connection Exception occurs", e);
|
||||||
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Response.status(Response.Status.OK).entity(comment).build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -164,6 +165,7 @@ public class CommentManagementAPIImpl implements CommentManagementAPI{
|
|||||||
Stars= commentsManager.getStars(uuid);
|
Stars= commentsManager.getStars(uuid);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error("SQL Exception occurs", e);
|
log.error("SQL Exception occurs", e);
|
||||||
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
}
|
}
|
||||||
return Response.status(Response.Status.OK).entity(Stars).build();
|
return Response.status(Response.Status.OK).entity(Stars).build();
|
||||||
}
|
}
|
||||||
@ -182,6 +184,7 @@ public class CommentManagementAPIImpl implements CommentManagementAPI{
|
|||||||
ratedUsers= commentsManager.getRatedUser(uuid);
|
ratedUsers= commentsManager.getRatedUser(uuid);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error("SQL Exception occurs", e);
|
log.error("SQL Exception occurs", e);
|
||||||
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
}
|
}
|
||||||
return Response.status(Response.Status.OK).entity(ratedUsers).build();
|
return Response.status(Response.Status.OK).entity(ratedUsers).build();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user