reinforcement_learning
reinforcement_learning copied to clipboard
Support for converting rlclient lib error codes to string descriptions
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.
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.
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