reinforcement_learning icon indicating copy to clipboard operation
reinforcement_learning copied to clipboard

Support for converting rlclient lib error codes to string descriptions

Open rajan-chari opened this issue 6 years ago • 2 comments
trafficstars

Currently all API methods take an apistatus object if error details are needed as strings. It would be good to have a utility method to convert the error codes into strings.

rajan-chari avatar Feb 15 '19 15:02 rajan-chari

One way to do something like this is to set up a single "ground truth" source of constants (config keys/values, error numbers, error strings) to be shared between the different bindings and RLClientLib. Then rather than opening up an API, we simply generate the language-appropriate constants code.

lokitoth avatar Mar 01 '19 15:03 lokitoth

We actually currently have this and it is how I generated the relevant exceptions in Python and error constants in C++.

See this file: https://github.com/VowpalWabbit/reinforcement_learning/blob/master/include/errors_data.h

jackgerrits avatar Mar 01 '19 17:03 jackgerrits