You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by Antonio Sanso <as...@adobe.com> on 2011/12/30 16:29:09 UTC
OAuthSystemException vs OAuthProblemException
Hi *,
I have noticed that a lot of Amber method throws both OAuthSystemException,OAuthProblemException.
While I understand the use of OAuthProblemException that matches really well with OAuthResponse I feel a little ackward on catch/use OAuthSystemException.
I was wondering is it really needed? If yes, which one is the idea behind?
Thanks in advance
Antonio
Re: OAuthSystemException vs OAuthProblemException
Posted by Łukasz Moreń <lu...@gmail.com>.
server_error is defined in the spec, so I would say it's rather
OAuthProblemException
2011/12/30 Antonio Sanso <as...@adobe.com>
>
> On Dec 30, 2011, at 6:55 PM, Łukasz Moreń wrote:
>
> > OAuthSystemException - critical problem with the Amber library, user is
> > not able to recover from this error
>
> would not
>
> server_error
> The authorization server encountered an unexpected
> condition which prevented it from fulfilling the request.
>
>
> defined in [0] suit in this case?
>
> Regards
>
> A.
>
> [0] http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-4.1.2.1
Re: OAuthSystemException vs OAuthProblemException
Posted by Antonio Sanso <as...@adobe.com>.
On Dec 30, 2011, at 6:55 PM, Łukasz Moreń wrote:
> OAuthSystemException - critical problem with the Amber library, user is
> not able to recover from this error
would not
server_error
The authorization server encountered an unexpected
condition which prevented it from fulfilling the request.
defined in [0] suit in this case?
Regards
A.
[0] http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-4.1.2.1
Re: OAuthSystemException vs OAuthProblemException
Posted by Łukasz Moreń <lu...@gmail.com>.
These two exception were designed to use as follows:
- OAuthSystemException - critical problem with the Amber library, user is
not able to recover from this error
- OAuthProblemException - error that regards to OAuth protocol error,
which user can handle and recover from it, e.g. obtain new token if
OAuthProblemException says: token_expired
I agree that OAuthSystemException should be probably runtime.
Cheers, Lukasz
On Fri, Dec 30, 2011 at 6:47 PM, Raymond Feng <en...@gmail.com> wrote:
> I agree. At least we should make OAuthSystemException as a runtime
> exception.
>
> Raymond Feng
> Sent from my iPhone
>
> On Dec 30, 2011, at 7:29 AM, Antonio Sanso <as...@adobe.com> wrote:
>
> > Hi *,
> >
> > I have noticed that a lot of Amber method throws both
> OAuthSystemException,OAuthProblemException.
> >
> > While I understand the use of OAuthProblemException that matches really
> well with OAuthResponse I feel a little ackward on catch/use
> OAuthSystemException.
> >
> > I was wondering is it really needed? If yes, which one is the idea
> behind?
> >
> > Thanks in advance
> >
> > Antonio
>
Re: OAuthSystemException vs OAuthProblemException
Posted by Raymond Feng <en...@gmail.com>.
I agree. At least we should make OAuthSystemException as a runtime exception.
Raymond Feng
Sent from my iPhone
On Dec 30, 2011, at 7:29 AM, Antonio Sanso <as...@adobe.com> wrote:
> Hi *,
>
> I have noticed that a lot of Amber method throws both OAuthSystemException,OAuthProblemException.
>
> While I understand the use of OAuthProblemException that matches really well with OAuthResponse I feel a little ackward on catch/use OAuthSystemException.
>
> I was wondering is it really needed? If yes, which one is the idea behind?
>
> Thanks in advance
>
> Antonio