box / box-windows-sdk-v2

Windows SDK for v2 of the Box API. The SDK is built upon .NET Framework 4.5

Home Page:https://developer.box.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AuthRepository is throwing InvalidCastException when refresh the access token failed.

pika-shiro opened this issue · comments

Description of the Issue

Unable to cast object of type 'Box.V2.Exceptions.BoxAPIException' to type 'Box.V2.Exceptions.BoxSessionInvalidatedException'

Steps to Reproduce

Use a invalid refresh token to Refresh the access token.

Expected Behavior

https://github.com/box/box-windows-sdk-v2/blob/main/Box.V2/Exceptions/BoxAuthenticationFailedException.cs#L29
The 'ex' is BoxAPIException, cannot cast to BoxSessionInvalidatedException.

Versions Used

.Net 6.0
Windows 10
Box.V2.Core 4.1.0

Hi @ding-tea

Thanks for submitting this Issue! We will take a look and get back to you ASAP!

@arjankowski

Having the same issue as well. Thanks for all your hard work!

commented

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.