pc_response: Normalize an HTTP Response Into a Typed PubChem Result
Description
Parses PubChem response payloads and standardizes them into a typed
`PubChemResult` object with success, error, and metadata fields.
Usage
pc_response(response, request = list())
Value
An object of class `PubChemResult`.
Arguments
response
A `httr` response object or raw text.
request
Request metadata list.
Details
JSON and plain-text payloads are supported. Fault payloads and non-2xx HTTP
statuses are normalized into structured error entries rather than raising
immediate transport exceptions.