Skip to contents

Read data package error

Usage

read_data_package_error(transaction, env = "production")

Arguments

transaction

(character) Transaction identifier

env

(character) Repository environment. Can be: "production", "staging", or "development".

Value

An error is returned if an error occurred while processing the request, otherwise NULL is returned if no error was encountered or if processing is still underway.

Note

User authentication is required (see login())

Examples

if (FALSE) {

# Create zip archive
packageId <- "knb-lter-sev.31999.1"
transaction <- create_data_package_archive(packageId)
transaction
#> [1] "archive_knb-lter-sev.31999.1_16396683904724129"

# Check creation status
read_data_package_error(transaction)

# Download zip archive
read_data_package_archive(packageId, transaction, path = tempdir())
#> |=============================================================| 100%
dir(tempdir())
#> [1] "knb-lter-sev.31999.1.zip"
}