[OLINGO-979] corrected localized error message

Signed-off-by: Christian Amend <christian.amend@sap.com>
This commit is contained in:
Morten Riedel 2016-07-14 13:14:36 +02:00 committed by Christian Amend
parent a6bde3beea
commit e916006e27
1 changed files with 2 additions and 1 deletions

View File

@ -132,6 +132,7 @@ public class ODataExceptionHelper {
serverError.setStatusCode(e.getStatusCode());
serverError.setLocale(e.getLocale());
serverError.setCode(e.getODataErrorCode());
serverError.setMessage(e.getLocalizedMessage());
return serverError;
}
@ -143,7 +144,7 @@ public class ODataExceptionHelper {
}
private static ODataServerError basicServerError(final Exception e) {
ODataServerError serverError = new ODataServerError().setException(e).setMessage(e.getLocalizedMessage());
ODataServerError serverError = new ODataServerError().setException(e).setMessage(e.getMessage());
if (serverError.getMessage() == null) {
serverError.setMessage("OData Library: An exception without message text was thrown.");
}