org.apache.olingo.commons.api.ex

## Class ODataError

- java.lang.Object
- - org.apache.olingo.commons.api.ex.ODataError

- Direct Known Subclasses:
    ODataServerError

      public class ODataError
      extends Object

  OData error.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ODataError()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `getAdditionalProperties()` Gets server defined additional properties.
    `String` | `getCode()` The value for the code name/value pair is a language-independent string.
    `List<ODataErrorDetail>` | `getDetails()` Gets error details.
    `Map<String,String>` | `getInnerError()` Gets server defined key-value pairs for debug environment only.
    `String` | `getMessage()` The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
    `String` | `getTarget()` The value for the target name/value pair is the target of the particular error (for example, the name of the property in error).
    `ODataError` | `setAdditionalProperties(Map<String,Object> additionalProperties)` Sets server defined additional properties
    `ODataError` | `setCode(String code)` The value for the code name/value pair is a language-independent string.
    `ODataError` | `setDetails(List<ODataErrorDetail> details)` Sets error details.
    `ODataError` | `setInnerError(Map<String,String> innerError)` Sets server defined key-value pairs for debug environment only.
    `ODataError` | `setMessage(String message)` The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
    `ODataError` | `setTarget(String target)` The value for the target name/value pair is the target of the particular error (for example, the name of the property in error).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ODataError

          public ODataError()

  - ### Method Detail

    - #### getCode

          public String getCode()

      The value for the code name/value pair is a language-independent string. Its value is a service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
      Returns:
        the error code as a string

    - #### setCode

          public ODataError setCode(String code)

      The value for the code name/value pair is a language-independent string. Its value is a service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
      Parameters:
        `code` - the service defined error code for this error
      Returns:
        this for method chaining

    - #### getMessage

          public String getMessage()

      The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error. MUST not be null
      Returns:
        the message string

    - #### setMessage

          public ODataError setMessage(String message)

      The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error. MUST not be null
      Parameters:
        `message` - message for this error
      Returns:
        this for method chaining

    - #### getTarget

          public String getTarget()

      The value for the target name/value pair is the target of the particular error (for example, the name of the property in error). MAY be null.
      Returns:
        the target string

    - #### setTarget

          public ODataError setTarget(String target)

      The value for the target name/value pair is the target of the particular error (for example, the name of the property in error). MAY be null.
      Parameters:
        `target` - target to which this error is related to
      Returns:
        this for method chaining

    - #### getDetails

          public List<ODataErrorDetail> getDetails()

      Gets error details.
      Returns:
        ODataErrorDetail list.

    - #### setDetails

          public ODataError setDetails(List<ODataErrorDetail> details)

      Sets error details.
      Returns:
        this for method chaining.

    - #### getInnerError

          public Map<String,String> getInnerError()

      Gets server defined key-value pairs for debug environment only.
      Returns:
        a pair representing server defined object. MAY be null.

    - #### setInnerError

          public ODataError setInnerError(Map<String,String> innerError)

      Sets server defined key-value pairs for debug environment only.
      Returns:
        this for method chaining.

    - #### setAdditionalProperties

          public ODataError setAdditionalProperties(Map<String,Object> additionalProperties)

      Sets server defined additional properties
      Parameters:
        `additionalProperties` -
      Returns:
        this for method chaining.

    - #### getAdditionalProperties

          public Map<String,Object> getAdditionalProperties()

      Gets server defined additional properties.
      Returns:
        a pair representing server defined object.

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.