Share via


GraphError Class

  • java.lang.Object
    • com.microsoft.graph.http.GraphError

public class GraphError

Represents an error returned by the service

Field Summary

Modifier and Type Field and Description
java.lang.String code

The error code

GraphInnerError innererror

The inner error

java.lang.String message

The error message

Constructor Summary

Constructor Description
GraphError()

Method Summary

Modifier and Type Method and Description
final GraphError copy()

Makes a deep copy of this GraphError

boolean isError(GraphErrorCodes expectedCode)

Determine if the given error code is the one that is expected

protected java.lang.String transformErrorCodeCase(String original)

Transforms the text error code into the format expected by the value of the enum

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

code

public String code

The error code

innererror

public GraphInnerError innererror

The inner error

message

public String message

The error message

Constructor Details

GraphError

public GraphError()

Method Details

copy

public final GraphError copy()

Makes a deep copy of this GraphError

Returns:

The copy of this GraphError

isError

public boolean isError(GraphErrorCodes expectedCode)

Determine if the given error code is the one that is expected

Parameters:

expectedCode - the expected error code

Returns:

true if the error code matches, and false if there was no match

transformErrorCodeCase

protected String transformErrorCodeCase(String original)

Transforms the text error code into the format expected by the value of the enum

Parameters:

original - original lowser Camel cased error code

Returns:

the resulting upper undescore cased error code

Applies to