Rblpapi icon indicating copy to clipboard operation
Rblpapi copied to clipboard

Better error-handling

Open johnlaing opened this issue 4 years ago • 3 comments

We should catch error messages passed back to us by the API. It would be particularly helpful to capture the message and show it to the user. The status quo of ignoring API error messages often causes a real error (the kind that stops execution) just down the line, except now with a cryptic message that doesn't shed much light on what went wrong.

Such an example is here: https://github.com/Rblp/Rblpapi/issues/338#issuecomment-835261565

johnlaing avatar May 08 '21 10:05 johnlaing

It's been a while since I have been in the code but ... what can we do in general? Do we get earlier status messages?

eddelbuettel avatar May 08 '21 12:05 eddelbuettel

Looking at #338 we can probably just Rcpp::stop( txtOfTheReceivedErrorMessage ) which then goes to the top R prompt.

eddelbuettel avatar May 08 '21 12:05 eddelbuettel

Yes, something like that should work. We'll need to figure out how to identify/grab the responseError to get to it.

johnlaing avatar May 08 '21 13:05 johnlaing