Skip to content

Commit

Permalink
#11722: Fixed for invalid HTTP response when creating content-type wi…
Browse files Browse the repository at this point in the history
…th (#11740) (#11742)

existing variable
  • Loading branch information
agomez-dotcms authored and dsilvam committed May 26, 2017
1 parent 8f9140b commit 29a0898
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public final Response createType(@Context final HttpServletRequest req, final St

response = ExceptionMapperUtil.createResponse(null, "Content-type is not valid ("+ e.getMessage() +")");

} catch (DotDataException e) {

response = ExceptionMapperUtil.createResponse(null, "Content-type is not valid ("+ e.getMessage() +")");

} catch (Exception e) {

response = ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR);
Expand Down Expand Up @@ -150,6 +154,10 @@ public Response updateType(@PathParam("id") final String id, final String json,

response = ExceptionMapperUtil.createResponse(e, Response.Status.NOT_FOUND);

} catch (DotDataException e) {

response = ExceptionMapperUtil.createResponse(null, "Content-type is not valid ("+ e.getMessage() +")");

} catch (Exception e) {

response = ExceptionMapperUtil.createResponse(e, Response.Status.INTERNAL_SERVER_ERROR);
Expand Down

0 comments on commit 29a0898

Please sign in to comment.