| .. | .. |
|---|
| 113 | 113 | // } |
|---|
| 114 | 114 | |
|---|
| 115 | 115 | 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) { |
|---|
| 118 | 118 | 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(); |
|---|
| 120 | 120 | } |
|---|
| 121 | | - return Response.ok(lt).build(); |
|---|
| 121 | + return Response.ok(org).build(); |
|---|
| 122 | 122 | } |
|---|
| 123 | 123 | |
|---|
| 124 | 124 | private boolean isCyclicalRelationship(int currentId, Organization parent) { |
|---|