com.atlassian.crowd.plugin.rest.entity
Class ErrorEntity
java.lang.Object
com.atlassian.crowd.plugin.rest.entity.ErrorEntity
public class ErrorEntity
- extends Object
Represents an error. All errors returned from REST resources should have the error entity in the response.
- Since:
- v2.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ErrorEntity
public ErrorEntity(ErrorEntity.ErrorReason reason,
String message)
- Constructs an error entity.
- Parameters:
reason
- reason for the error.message
- message
getReason
public ErrorEntity.ErrorReason getReason()
getMessage
public String getMessage()
of
public static ErrorEntity of(Exception exception)
- Creates appropriate error entity from the given exception.
- Parameters:
exception
- exception from which the ErrorEntity has to be created.
- Returns:
- ErrorEntity.
Copyright © 2013 Atlassian. All Rights Reserved.