Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

Commit40e0248

Browse files
committed
Tweak error handling and cache on disk
1 parent7f371c7 commit40e0248

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎R/api_v2_utils.R‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ req_errors <- function(resp) {
111111

112112
if (any(lengths(r$errors)>1)) {
113113
if (is.data.frame(r$errors[[1]])) {
114-
errors<-do.call(rbind,r$errors)
114+
errors<-r$errors
115115
}else {
116116
errors<- do.call(rbind, lapply(r$errors,list2DF))
117117
}
@@ -144,7 +144,8 @@ req_v2 <- function(scopes) {
144144
auth_url="https://twitter.com/i/oauth2/authorize",
145145
pkce=TRUE,
146146
scope= paste(scopes_client,collapse=""),
147-
redirect_uri="http://127.0.0.1:1410"
147+
redirect_uri="http://127.0.0.1:1410",
148+
cache_disk=TRUE
148149
# redirect_uri = "http://localhost:1410"
149150
)
150151

@@ -153,7 +154,7 @@ req_v2 <- function(scopes) {
153154
req_try<-httr2::req_retry(req_content,
154155
is_transient=twitter_is_transient,
155156
after=twitter_after)
156-
req<-httr2::req_error(req_try,is_error=req_is_error,body=req_errors)
157+
req<-httr2::req_error(req_try,is_error=httr2::resp_is_error,body=req_errors)
157158
req
158159
}
159160

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp