error handlers added to api class