Skip to content

drive_share fails unexpectedly when sharing to certain users #452

@fisher-j

Description

@fisher-j

Function works for most users. Fails unexpectedly with certain users (2 out of 60). The file does end up being shared.

The error:

Caused by error in `map_chr()`:
i In index: 1.
Caused by error:
! Result must be length 1, not 0.

referring to this line:

ok <- map_chr(permission_out, "type") == type

Apparently, the result of the previous line (permission_out) does not have the expected content.

I'm passing a 1-row dribble, to which I've added email and message columns. Constructing a reproducible example is difficult, because I'm not sure why these two dribbles are failing. They seem very similar to the rest of the rows, which do work. I could share a dput of the offending rows, but I'd want to be sure this is safe (not sharing sensitive user data).

This is what they look like, superficially

  vendor_name             name                                      id                                drive_resource    email
  <chr>                   <chr>                                     <drv_id>                          <list>            <chr>
1 Fat Cat Bakes           Fat-Cat-Bakes-mar-16-31-2024.pdf          1hLH53FPB8NrRDC99z23UeIXWzANzQcBm <named list [41]> [email protected]
2 Nona's Bulgarian Yogurt Nonas-Bulgarian-Yogurt-mar-16-31-2024.pdf 1RNA2ftfu3BvDSLMmcftISkZgCHlak8Jp <named list [41]> [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions