Thanks to visit codestin.com
Credit goes to github.com

Skip to content

box_auth_service() randomly returns a 400 (Failed to connect to box.com API) message #166

@jrosen48

Description

@jrosen48

Thanks once again for a great package. I noticed that box_auth_service() sometimes returns a 400 (Failed to connect to box.com API) message. The frustrating part is that it appears to be mostly random when it does.

For example, below I run the function 10 times, and 4 of those 10 times were associated with 400 messages, three which were retried which succeeded, and one which did not.

I recognize that this appears to be on Box's - not {boxr}'s - side, but do you have any suggestions or ideas about how to fix or understand what is happening here?

> for (i in seq(10)) {
+     try(box_auth_service(token_text = unlist(read_lines('boxr-auth/token.json'))))
+     Sys.sleep(1)
+ }
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
Request failed [400]. Retrying in 1 seconds...
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
Request failed [400]. Retrying in 1 seconds...
Request failed [400]. Retrying in 2 seconds...
Request failed [400]. Retrying in 1 seconds...
Request failed [400]. Retrying in 3.6 seconds...
Error in test_request() : 
  Bad Request (HTTP 400). Failed to connect to box.com API.
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
Request failed [400]. Retrying in 1 seconds...
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
Request failed [400]. Retrying in 1.8 seconds...
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
Request failed [400]. Retrying in 1.4 seconds...
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)
boxr: Authenticated using OAuth2 (JWT) as faast ([email protected], id: 13460778359)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions