Argument validation
Opened this issue · 1 comments
odinuv commented
odinuv commented
Some validation is in the table class e.g. https://github.com/keboola/sapi-python-client/blob/master/kbcstorage/tables.py#L61
- looks ugly and is repetitive but works fairly well
- the main thing to catch is that the provided values are of correct type (scalar/object/list), without any validation it is possible to pass an object instead of e.g. file_id which leads to very strange errors
- there is slight twist in files, where id can be either a string or integer - it should be treated as string (to avoid int overflow), but the JSON response contains it as an integer