Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box Collaboration Forbidden exception does not include the ErrorCode "forbidden_by_policy" value, it is empty. #826

Closed
pandimurugan-a opened this issue May 19, 2022 · 3 comments
Assignees
Labels

Comments

@pandimurugan-a
Copy link

We got the Forbidden exception while collaborating to Shield folder in box and the error message is " Box.V2.Exceptions.BoxAPIException: The API returned an error [Forbidden | s5h46dh2e1hyml6m.05dd0bec8c5cae65ff903a40774c844d1] forbidden_by_policy - Access denied by Shield policy", but we do not get the ErrorCode "forbidden_by_policy" in ex.ErrorCode to classify this exception.

https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/#403-forbidden
try {
// establish collaboration
}
catch (BoxAPIException ex) {

// ex.ErrorCode is empty. no value here

}

Please fix this.

@arjankowski
Copy link
Contributor

arjankowski commented May 23, 2022

Hi @pandimurugan-a

Thank you for submitting this number!
Could you please give me more information about it?

  1. What operation were you performing on this folder?
  2. Could you please show me the response you got?
  3. Could you execute this this operation with CURL and check if the response will be the same as in SDK?

@pandimurugan-a
Copy link
Author

Hi @arjankowski arjankowski,

Thanks for fixing this bug. Here is my comments.

  1. We establish collaboration to a box shield folder with external user email.
  2. Customer has box shield feature in their enterprise account and I do not have the same feature in my dev account. I just logged the ex.ErrorCode value into database error log to check and found that it is empty. You can simply reproduce this with your internal box account which has box shield.
  3. We only use .NET SDK in the application.

Thank you.

@arjankowski
Copy link
Contributor

Hi @pandimurugan-a,

We plan to release a new version of this box-windows-sdk with this fix within two weeks.

I'm closing this issue, but feel free to reopen it if the problem will still occurs.

Regards!
Artur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants