kevin-m-kent / youtubeR

https://kevin-m-kent.github.io/youtubeR/
Other
2 stars 1 forks source link

Use API-supplied Error Explanations #5

Open jonthegeek opened 1 year ago

jonthegeek commented 1 year ago

(implement via api2r)

In .prepare_request (or possibly an interim function that also does the perform step?), implement httr2::req_error() using the definitions supplied in the API spec.

This probably depends on the endpoint, so we'll want a function or series of functions to deal with this. Or possibly a single function with a lookup, but I like the idea of auto-generating functions so we can edit them to make more sense if the API spec is unclear.