Lasterror seems to only run if the api does not run. api1.status can be used to access the status code