| .. | .. |
|---|
| 27 | 27 | import javax.ws.rs.core.Response.Status; |
|---|
| 28 | 28 | |
|---|
| 29 | 29 | import net.curisit.integrity.commons.Utils; |
|---|
| 30 | +import net.curisit.securis.DefaultExceptionHandler; |
|---|
| 30 | 31 | import net.curisit.securis.db.Organization; |
|---|
| 31 | 32 | import net.curisit.securis.db.User; |
|---|
| 32 | 33 | import net.curisit.securis.utils.TokenHelper; |
|---|
| .. | .. |
|---|
| 122 | 123 | Organization o = em.find(Organization.class, orgId); |
|---|
| 123 | 124 | if (o == null) { |
|---|
| 124 | 125 | log.error("User organization with id {} not found in DB", orgId); |
|---|
| 125 | | - return Response.status(Status.NOT_FOUND).header("SECURIS_ERROR", "User's organization not found with ID: " + orgId).build(); |
|---|
| 126 | + return Response.status(Status.NOT_FOUND).header(DefaultExceptionHandler.ERROR_MESSAGE_HEADER, "User's organization not found with ID: " + orgId).build(); |
|---|
| 126 | 127 | } |
|---|
| 127 | 128 | orgs.add(o); |
|---|
| 128 | 129 | } |
|---|
| .. | .. |
|---|
| 161 | 162 | Organization o = em.find(Organization.class, orgId); |
|---|
| 162 | 163 | if (o == null) { |
|---|
| 163 | 164 | log.error("User organization with id {} not found in DB", orgId); |
|---|
| 164 | | - return Response.status(Status.NOT_FOUND).header("SECURIS_ERROR", "User's user not found with ID: " + orgId).build(); |
|---|
| 165 | + return Response.status(Status.NOT_FOUND).header(DefaultExceptionHandler.ERROR_MESSAGE_HEADER, "User's user not found with ID: " + orgId).build(); |
|---|
| 165 | 166 | } |
|---|
| 166 | 167 | orgs.add(o); |
|---|
| 167 | 168 | } |
|---|