Hi,

For the moment this would be the way to filter out the cause. But the
better approach would be to set a flag in AccessInformation class on the
respective error type. For this we need to improve AccessInformation class.

May I know your use case ?.

thanks,

On Wed, Jul 22, 2015 at 11:37 AM, Thilini Cooray <[email protected]> wrote:

> Hi,
>
> I would like to have a little clarification regarding canAccess method in 
> RoleBasedAccessRateController
> of org.wso2.carbon.throttle.core.
>
> Consider following example
>           AccessInformation info =
> roleBasedAccessControler.canAccess(throttleContext, consumerKey,
> throttleId);
>
> I want to filter out the situation where info.isAccessAllowed() = false due
> to the reason "exceeded the allocated quota".
>
> Is there a more suitable approach to do this check other than info.
> getFaultReason().contains("exceeded the allocated quota")?
>
> Thanks.
>
> --
> Best Regards,
>
> *Thilini Cooray*
> Software Engineer
> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
> E-mail : [email protected]
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: [email protected] <[email protected]>
mobile: +94 (0)71 56 91 321
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to