Fix get curators method response, causing 500 error
This commit is contained in:
parent
f2032304c1
commit
63aa4ea432
|
@ -462,7 +462,7 @@ public class RegistryService {
|
|||
public Response getCurators(@PathParam("type") String type) {
|
||||
try {
|
||||
JsonElement response = calls.getAllCurators(type);
|
||||
return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(response.toString())).type(MediaType.APPLICATION_JSON).build();
|
||||
return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(response).toString()).type(MediaType.APPLICATION_JSON).build();
|
||||
} catch (HttpClientErrorException e) {
|
||||
String message = new JsonParser().parse(e.getResponseBodyAsString()).getAsJsonObject().get("message").getAsString();
|
||||
return Response.status(e.getStatusCode().value()).entity(jsonUtils.createResponse(message).toString()).type(MediaType.APPLICATION_JSON).build();
|
||||
|
|
Loading…
Reference in New Issue