The refresh token operation in OAuth2 policy is no going to fault flow if we pass expired refresh token. In following proxy if pass expired refresh token value in request.formparam.refreshtoken, it returns HTTP status code 400, however it is not reaching to fault handler flow. Instead, it continuing in regular flow and hence not executing fault handler policies.
<OAuthV2 async="false" continueOnError="false" enabled="true" name="OA.AccessTokenRefresh">
<DisplayName>OA.AccessTokenRefresh</DisplayName>
<Operation>RefreshAccessToken</Operation>
<GrantType>request.formparam.grant_type</GrantType>
<ExpiresIn ref="oauthv2accesstoken.GOA.GetOAuthAttributes.accesstoken.ttl">120000</ExpiresIn>
<RefreshTokenExpiresIn ref="oauthv2accesstoken.GOA.GetOAuthAttributes.accesstoken.refreshTtl">500000</RefreshTokenExpiresIn>
<RefreshToken>request.formparam.refreshtoken</RefreshToken>
<GenerateResponse enabled="true"/>
</OAuthV2>
Is this expected behavior (I assume not) or bug? Is there any workaround for this?