Roberto Sánchez
2014-01-22 1a0d1f15efa2b4cbdc6dd30b5a85b111d0599b63
securis/src/main/java/net/curisit/securis/services/OrganizationResource.java
....@@ -113,12 +113,12 @@
113113 // }
114114
115115 EntityManager em = emProvider.get();
116
- Organization lt = em.find(Organization.class, Integer.parseInt(orgid));
117
- if (lt == null) {
116
+ Organization org = em.find(Organization.class, Integer.parseInt(orgid));
117
+ if (org == null) {
118118 log.error("Organization with id {} not found in DB", orgid);
119
- return Response.status(Status.NOT_FOUND).build();
119
+ return Response.status(Status.NOT_FOUND).header(DefaultExceptionHandler.ERROR_MESSAGE_HEADER, "Organization not found, id: " + orgid).build();
120120 }
121
- return Response.ok(lt).build();
121
+ return Response.ok(org).build();
122122 }
123123
124124 private boolean isCyclicalRelationship(int currentId, Organization parent) {