Class ServerSideException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- edu.uiuc.ncsa.security.core.exceptions.GeneralException
-
- edu.uiuc.ncsa.security.core.exceptions.ServerSideException
-
- All Implemented Interfaces:
Serializable
public class ServerSideException extends GeneralException
An exception that wraps a server-side exception. OAuth 1.0a, for example will intercept every response from the server and throw an exception if there is anything other than a status of 200. Therefore, catch such exceptions and throw this in their stead. it is too easy to lose information the way OAuth does it as every exception is an OAuthProblemException.A Note on server side exceptions propagated to the client
OAuth 1.0a does support returning some information about server side exceptions. Generally, OA4MP should not do this unless specifically requested to do so by the client. The reason for this is that while a mechanism is given by OAuth, the details (as expected) are lacking. In this case, if a client sets the request parameter "oa4mp_debug=true" in the initial call, then IF there is an exception on the server side the result will be unpacked as follows:- A local ServerSideException will be thrown.
- If the server supports it, a redirect to a server-side error page may be supplied in the redirect property
- The server may return any number of key value pairs. Only one of these is guaranteed to exist, the stack trace. This is returned as a string.
Created by Jeff Gaynor
on 9/4/12 at 7:16 PM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServerSideException()
ServerSideException(String message)
ServerSideException(String message, Throwable cause)
ServerSideException(Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getQueryParameters()
If there is a redirect, any parameters passes as part of it will be parsed and put in this map as key value pairs.URI
getRedirect()
boolean
isTrivial()
void
setQueryParameters(Map<String,String> queryParameters)
void
setRedirect(URI redirect)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getRedirect
public URI getRedirect()
-
setRedirect
public void setRedirect(URI redirect)
-
getQueryParameters
public Map<String,String> getQueryParameters()
If there is a redirect, any parameters passes as part of it will be parsed and put in this map as key value pairs. This should let clients print out any other information they may want/need about the error.- Returns:
-
isTrivial
public boolean isTrivial()
-
-