mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2)
126242 gjames: RA-878:All api errors should return the standard error object git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127571 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -79,8 +79,8 @@ public class NetworksWebScriptGet extends ApiWebScript
|
||||
|
||||
// apply content type
|
||||
res.setContentType(Format.JSON.mimetype() + ";charset=UTF-8");
|
||||
|
||||
jsonHelper.withWriter(res.getOutputStream(), new Writer()
|
||||
|
||||
assistant.getJsonHelper().withWriter(res.getOutputStream(), new Writer()
|
||||
{
|
||||
@Override
|
||||
public void writeContents(JsonGenerator generator, ObjectMapper objectMapper)
|
||||
@@ -107,17 +107,13 @@ public class NetworksWebScriptGet extends ApiWebScript
|
||||
}
|
||||
}, true, true);
|
||||
}
|
||||
catch (ApiException apiException)
|
||||
catch (ApiException | WebScriptException apiException)
|
||||
{
|
||||
renderErrorResponse(resolveException(apiException), res);
|
||||
}
|
||||
catch (WebScriptException webException)
|
||||
{
|
||||
renderErrorResponse(resolveException(webException), res);
|
||||
assistant.renderException(apiException, res);
|
||||
}
|
||||
catch (RuntimeException runtimeException)
|
||||
{
|
||||
renderErrorResponse(resolveException(runtimeException), res);
|
||||
assistant.renderException(runtimeException, res);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user