calling error callback when local api could not be resolved