fhdsl / metricminer

R package that digs up data that matters from APIs, making it dashboard-ready
https://hutchdatascience.org/metricminer/
MIT License
2 stars 0 forks source link

Add better handling for API response JSONs #32

Open cansavvy opened 9 months ago

cansavvy commented 9 months ago

A lot of this code is built based on the idea that the JSON returned from the API should be the same. But sometimes it isn't or the API might change.

So we need better handling of what happens when an expected spot in a JSON file is not there.

I'm thinking of a function like try_json() that will attempt to grab a json slot but if it isn't there will send back a detailed error report about what isn't there.

cansavvy commented 9 months ago

Picturing making an R6 class object to do more standardized handling https://r6.r-lib.org/reference/R6Class.html