paws-r / paws

Paws, a package for Amazon Web Services in R
https://www.paws-r-sdk.com
Other
305 stars 37 forks source link

Enrich error message #796

Closed DyfanJones closed 4 days ago

DyfanJones commented 4 days ago

This PR will enrich error messages and align with boto3 error message template

# previous error message format
svc <- paws.storage::s3()
response <- svc$get_object(
  Bucket = "<bucket>",
  Key = "<key>",
  IfNoneMatch = "<etag>"
)
#> Error: SerializationError (HTTP 304). failed to read from query HTTP response body
# new error message format
client <- paws.storage::s3()
resp <- client$get_object(
  Bucket = "<bucket>",
  Key = "<key>",
  IfNoneMatch = "<etag>"
)
#> Error: SerializationError (HTTP 304). An error occurred (304) when calling the GetObject operation: Not Modified