Skip to content

Commit 40d97c5

Browse files
committed
added simple error to post toot
1 parent 1f81920 commit 40d97c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/post.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ post_toot <- function(
8484
)
8585
if (httr::status_code(r) == 200L) {
8686
sayif(verbose, "Your toot has been posted!")
87+
} else {
88+
cli::cli_abort(
89+
"Failed to post toot. Status code: {httr::status_code(r)}"
90+
)
8791
}
8892
invisible(r)
8993
}

0 commit comments

Comments
 (0)