Package org.jclouds.oauth.v2
Class OAuthFallbacks.AuthorizationExceptionOn4xx
- java.lang.Object
-
- org.jclouds.oauth.v2.OAuthFallbacks.AuthorizationExceptionOn4xx
-
- Enclosing class:
- OAuthFallbacks
public static final class OAuthFallbacks.AuthorizationExceptionOn4xx extends Object implements Fallback<Object>
Fallback used to propagate anAuthorizationException
on any 4xx response.Since OAuth requests will take place as part of the OAuth filter execution, providers will not have direct access to configure its behavior. Any failure in the filter execution due to a client side error (such as malformed ids, etc) should be mapped to an
AuthorizationException
so providers and clients can properly handle the error.Note that we use a fallback instead of an error handler to allow each provider to bind their own handlers in a clean way, without having to rebind the OAuth one.
-
-
Constructor Summary
Constructors Constructor Description AuthorizationExceptionOn4xx()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Void
createOrPropagate(Throwable t)
The exception is provided so that theFallback
implementation can conditionally determine whether to propagate the exception or to attempt to recover.
-
-
-
Method Detail
-
createOrPropagate
public Void createOrPropagate(Throwable t) throws Exception
Description copied from interface:Fallback
The exception is provided so that theFallback
implementation can conditionally determine whether to propagate the exception or to attempt to recover.- Specified by:
createOrPropagate
in interfaceFallback<Object>
- Parameters:
t
- the exception that made the call fail.- Throws:
Exception
-
-