Added additional error string to api.py