[
https://issues.apache.org/jira/browse/OLINGO-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937691#comment-13937691
]
Michael Bolz commented on OLINGO-196:
-------------------------------------
Hi [~sumiteshrs],
I would introduce a {{readErrorDocument()}} at the {{EntityProvider}} as
counter part to the {{writeErrorDocument()}}.
I think this is what you requested.
But I don't think that we should introduce a translation of {{HttpStatusCodes}}.
Currently (and IMHO also in future) we should only support translation for the
{{ODataMessageExceptions}}.
Kind regards,
Michael
{code}
/**
* Read (de-serialize) data from error document as {@link InputStream} and
provide according
* {@link ODataErrorContext}.
*
* @param errorDocument error document which is read
* @param contentType format of content in the given input stream
* @return read error document
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
public static ODataErrorContext readErrorDocument(final InputStream
errorDocument, final String contentType)
throws EntityProviderException {
return createEntityProvider().readErrorDocument(errorDocument, contentType);
}
{code}
> A means should be exposed for de-serializing error streams
> ----------------------------------------------------------
>
> Key: OLINGO-196
> URL: https://issues.apache.org/jira/browse/OLINGO-196
> Project: Olingo
> Issue Type: New Feature
> Components: odata2-core
> Affects Versions: V2 1.0.0, V2 1.1.0
> Reporter: Sumitesh R S
> Assignee: Michael Bolz
> Priority: Critical
> Fix For: V2 1.3.0
>
>
> Currently, there is no means exposed to interpret error streams and get the
> translated error message when a service request returns error. It would be
> good if a means is exposed in EntityProvider which takes the error stream and
> returns a error message document back. Also, in order to make
> org.apache.olingo.odata2.api.commons.HttpStatusCodes consumable from the
> clients, it would be good if a means is exposed to take the response code as
> input which gives back a translated status definition back.
--
This message was sent by Atlassian JIRA
(v6.2#6252)